Menu

#12 Changing to Text Mode Editor Fails

open
nobody
None
5
2007-01-10
2007-01-10
No

Versions: SharpWebMail - Latest from SVN
FCKEditor: 2.3.2
Browser: Firefox 2.0.0.1
OS: Windows XP

Problem: The NewMessage dialog initialises in "HTML" mode. When this is changed to "TEXT" mode, via the radio button, the editor remains in HTML mode, the format window remains enabled (but collapsed) and the email is sent as HTML. If the mode is changed back to "HTML", and then back to "TEXT" mode the correct mode is selected, the format window is disabled (and collapsed) and the output format is text.

Diagnosis: The configuration file for FCKEditor 2.3.2 includes the FCKConfig.AdditionalNumericEntities element. This is referenced in the FCKXHtmlEntities.Initialize function, which is itself called when switchFCKEditorMode is called in response to a request to change the Editor mode. If FCKConfig.AdditionalNumericEntities is not defined, the JavaScript bails out in FCKXHtmlEntities.Initialize and the mode change is not completed. Subsequent calls to FCKXHtmlEntities.Initialize return without referencing FCKConfig.AdditionalNumericEntities and therefore the mode change is successful.

Resolution:

Two possibilities

1. Define FCKConfig.AdditionalNumericEntities in fckconfig.js .Could use fckconfig.js from the FCKEditor distribution to determine config defaults and call a SharpWebMail specific script to add custom values where required. Note: For consistency of the UI, FCKConfig.ToolbarStartExpanded should be initialised to "true" so the formatting window is visible when the NewMessage dialog is opened.

2. Modify FCKEditor code to include a check that FCKConfig.AdditionalNumericEntities has been defined, as follows:

if (FCKConfig.AdditionalNumericEntities)
{
.. original script code
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.