When TINYMCEPLUGIN_DISALBE is on
- The WYSIWYG button is displayed on a view page though it's not supposed to be displayed
- If the WYSIWYG button is clicked, a raw edit page shows up. But the buttons below the lower right corner of the text area (textarea buttons) are not displayed
The cause of these problems are
- The WYSIWYG button is displayed as long as TinyMCEPlugin is enabled. TINYMCEPLUGIN_DISABLE does not count
- The textarea buttons are displayed if TinyMCEPlugin is not enabled or nowysiwyg=1 URL paramater is provided. When the WYSIWYG button is clicked while TINYMCEPLUGIN_DISABLED is on, that condition is not met
The following changes are made to fix the problems
- TinyMCEPlugin's initPlugin() enters the TinyMCEPluginAvailable context if TINYMCEPLUGIN_DISALBE is false
- core's templates/viewtopicactionbuttons.tmpl is modified to see the TinyMCEPluginAvailable context instead of TinyMCEPluginEnabled context, which is in effect as long as the plug-in is installed
- PatternSkin's templates/edit.pattern.tmpl checks the textareas_hijacked context instead of the TinyMCEPluginEnabled to determine whether or not to display the textarea buttons
What would happen if the latest TinyMCEPlugin and/or PatternSkin are used without the core change?
- TinyMCEPlugin has no problem because it just puts an additional context, which is referred to by nobody
- PatternSkin has no problem because the textareas_hijacked context has been set when WYSIWYG editing is done by TinyMCEPlugin
The latest version of TWiki core is supposed to be used together with the latest version of bundled plug-ins. A release branches core is supposed to be used together with the plug-ins in the same branch. As such, this fix won't cause any problems under all possible circumstances.
This seems to be fixed, so setting it to "waiting for release" state.