This is an integration of the fast and highly functional TinyMCEWYSIWYG editor. It supports a wide range of browsers, including Firefox, IE, Safari, Opera and Google Chrome (see compatibility chart). At the time of writing it doesn't work with Konqueror.

This plugin is able to swap out standard text areas and replace them with WYSIWYG editors. This means you get WYSIWYG editors for textareas in forms, as well as for the main text of the topic. It can also co-exist alongside other WYSIWYG editors.

The editor automatically "switches itself off" (i.e. reverts to the old text-only window) when editing topics that contain Foswiki content it can't handle, such as complex macros.

Editor Notes

The editor uses a translator module to convert from Foswiki Topic Markup Language (TML) to HTML and back. The translator converts special macros - such as %MACROS% - to plain text, and encloses them within HTML spans using a special style called WYSIWYG_PROTECTED. In this way the editor can detect text that is not meant to be HTML formatted. This style is also used to protect special text you enter into the editor from being interpreted when the topic is translated back into TML. If you want to add any special features that are sensitive to formatting, such as Set statements, then you should format those regions using 'Protect on save' or 'Protect forever'.

Installation Instructions

NOTES:

This plugin comes pre-installed on Foswiki. You should only need to re-install if there is an upgrade to the plugin.

When installed, it replaces the old "textarea" editor. You may still access the plaintext editor with the "Wiki Text" button provided in the toolbar, however this does not necessarily give you the original raw/wiki text version of the topic content. To bypass the TML to HTML conversion process entirely, use the Edit wiki text link provided by the default Foswiki skin at the bottom of the page.

First follow the installation instructions to install the Plugin:

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button.
Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the
search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)

Preferences

The default configuration of TinyMCEPlugin should prove sufficient for most users. The TinyMCE editor itself is customised through a Javascript object holding a substantial number of initialisation parameters. In previous versions of TinyMCEPlugin, a text string making up the Javascript object was held in an ordinary Foswiki preference variableTINYMCEPLUGIN_INIT which should be removed and replaced with TINYMCEPLUGIN_INIT_TOPIC (described below) in most circumstances.

TINYMCEPLUGIN_INIT_TOPIC

To make configuration easier and less error-prone, configuration is held in a topic section. The name of the topic is set in the preference variableTINYMCEPLUGIN_INIT_TOPIC, from which the section named TINYMCEPLUGIN_INIT is used. TINYMCEPLUGIN_INIT_TOPIC is currently set to %=TINYMCEPLUGIN_INIT_TOPIC%.

For a full explanation and guidance on configuration of available TinyMCE options, see the Moxicode TinyMCE Wiki.

Below is the default configuration. If it is to be modified, it should be copied (including %START/ENDSECTION{}% macros) to a different topic to avoid customisations being overwritten when TinyMCEPlugin is upgraded.

Saves the editor content to your web browser's local storage periodically so that it may be restored later

See TINYMCEPLUGIN_AUTOSAVE_INTERVAL and defaults to 180s; TINYMCEPLUGIN_AUTOSAVE_RETENTION defaults to 4320m

Additional Plugins

To enable extra plugins, set the TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS variable in your Main.SitePreferences.
If the plugin also offers a toolbar button, you will need to add it into the appropriate place in the TINYMCEPLUGIN_ADDITIONAL_BUTTONS* variables.

For example, to make use of the emotions and wordcount plugins add the following to Main.SitePreferences:

Description: Sometimes tables will fail to be converted to TML syntax (will stay as HTML) because there are attributes on the table (such as alignment or border decorations) that WysiwygPlugin does not know how to preserve. If such attributes are necessary, please use VarTABLE instead.

Work-around:

Click inside the offending table

Click the table toolbar button (usually used to create a new table)

With the exception of Cols and Rows, delete/reset all content from the fields on the 'General' and 'Advanced' tabs.

Foswikitask:Item1798: Fixed a problem where editor wants to put text elements into blocks causing unwanted new lines. Foswikitask:Item1341: Fixed a problem so that editor does not convert TML lettered and roman numeral lists back to numbered lists.

03 Jul 2009

Foswikitask:Item8178: Check that the help elements are present before hiding or showing them, as they are not present in all skins.

TWikibug:Item4946: I think I have finally fixed non-iso-8859-1 character sets. Painful.

31 Mar 2008

TWikibug:Item5314: TWikibug:Item5457: Fixed pickaxe mode for editing UTF-8. Characters above 255 are converted to entitites, which is a bit of a PITA, but at least it no longer corrupts topics. NOTE: YOU MUST UPGRADE WysiwygPlugin TO 16600 OR LATER

TWikibug:Item5047: disable save and preview during page load TWikibug:Item5111: make the entry in the format menu sensitive to where the cursor is TWikibug:Item5022: made TT font size same as verbatim. Had to add a new style to do it, as TMCE didn't want to play with TT or CODE tags.

TWikibug:Item4630: polished up the way the secret string is done, to ensure synch between perl and JS. TWikibug:Item4622: added UTF-8 handling steps that fixup malformed UTF8 strings before presenting them to the editor (saves Moz) and stops the editor passing them back to TWiki (saves IE). TWikibug:Item4603: added the draft help, so we can at least build the beta without the nasty warning