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'.
Edit wiki text
link provided by the default Foswiki skin at the bottom of the page.
cd /path/to/foswiki perl tools/extension_installer <NameOfExtension> installIf you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.
configure
.
configure
.
TINYMCEPLUGIN_INIT
which should be removed and replaced with TINYMCEPLUGIN_INIT_TOPIC
(described below) in most circumstances.
TINYMCEPLUGIN_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.
%STARTSECTION{"TINYMCEPLUGIN_INIT"}% "mode" : "textareas", "editor_selector" : "foswikiWysiwygEdit", "save_on_tinymce_forms" : true, "table_default_cellpadding" : 0, "table_default_cellspacing" : 1, "table_default_border" : 1, "theme" : "advanced", "convert_urls" : true, "relative_urls" : false, "remove_script_host" : false, "dialog_type" : "modal", "extended_valid_elements" : "li[type],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|data*]", "setupcontent_callback" : "FoswikiTiny.setUpContent", "urlconverter_callback" : "FoswikiTiny.convertLink", "foswikipuburl_callback" : "FoswikiTiny.convertPubURL", "save_callback" : "FoswikiTiny.saveCallback",%IF{ "$TINYMCEPLUGIN_DEBUG" then=" \"debug\" : true," }% "plugins" : "%IF{ "defined 'TINYMCEPLUGIN_MCEPLUGINS'" then="%TINYMCEPLUGIN_MCEPLUGINS%" else="%STARTSECTION{"MCEPLUGINS"}%contextmenu, table, searchreplace, autosave, paste, legacyoutput, inlinepopups, fullscreen, -foswiki, -foswikibuttons, -foswikiimage%ENDSECTION{"MCEPLUGINS"}%" }%%IF{ "defined 'TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS'" then=", %TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS%" }%", "foswiki_plugin_urls" : { "foswiki" : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/plugins/foswiki/editor_plugin.js", "foswikibuttons" : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/plugins/foswikibuttons/editor_plugin.js", "foswikiimage" : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/plugins/foswikiimage/editor_plugin.js" }, "foswiki_secret_id" : "%WYSIWYG_SECRET_ID%", "foswiki_vars" : { "PUBURLPATH" : "%PUBURLPATH%", "PUBURL" : "%PUBURL%", "WEB" : "%BASEWEB%", "TOPIC" : "%BASETOPIC%", "ATTACHURL" : "%PUBURL%/%BASEWEB%/%BASETOPIC%", "ATTACHURLPATH" : "%PUBURLPATH%/%BASEWEB%/%BASETOPIC%", "VIEWSCRIPTURL" : "%SCRIPTURL{view}%", "SCRIPTSUFFIX" : "%SCRIPTSUFFIX%", "SCRIPTURL" : "%SCRIPTURL%", "SYSTEMWEB" : "%SYSTEMWEB%" }, "theme_advanced_toolbar_align" : "left", "foswikibuttons_formats" : { /* Use 'attributes : { class : "foo" }' instead of 'classes: "foo"' * because this is how it's done in the default advanced theme shipped * with TinyMCE which seems to be a few ms faster on cursor movement */ "Normal" : { "remove" : "all" }, "Heading 1" : { "block" : "h1", "remove" : "all" }, "Heading 2" : { "block" : "h2", "remove" : "all" }, "Heading 3" : { "block" : "h3", "remove" : "all" }, "Heading 4" : { "block" : "h4", "remove" : "all" }, "Heading 5" : { "block" : "h5", "remove" : "all" }, "Heading 6" : { "block" : "h6", "remove" : "all" }, "VERBATIM" : { "block" : "pre", "remove" : "all", "attributes" : { "class" : "TMLverbatim" } }, "LITERAL" : { "block" : "div", "remove" : "all", "attributes" : { "class" : "WYSIWYG_LITERAL" } }, "Protect on save" : { "block" : "div", "remove" : "all", "attributes" : { "class" : "WYSIWYG_PROTECTED" } }, "Protect forever" : { "block" : "div", "remove" : "all", "attributes" : { "class" : "WYSIWYG_STICKY" } } }, "foswikibuttons_cursoridletime" : 250, "paste_create_paragraphs" : true, "paste_create_linebreaks" : false, "paste_convert_middot_lists" : true, "paste_convert_headers_to_strong" : false, "paste_remove_spans" : true, "paste_remove_styles" : true, "paste_strip_class_attributes" : "all", "theme_advanced_buttons1" : "%IF{ "defined 'TINYMCEPLUGIN_BUTTONS1'" then="%TINYMCEPLUGIN_BUTTONS1%" else="%STARTSECTION{"BUTTONS1"}%foswikiformat, separator, bold, italic, tt, colour, removeformat, separator, bullist, numlist, %IF{"context SUPPORTS_PARA_INDENT" then="fwexdent, fwindent" else="outdent, indent"}%, blockquote, separator, link, unlink, anchor, separator, undo, redo, separator, search, replace%ENDSECTION{"BUTTONS1"}%" }%%IF{ "defined 'TINYMCEPLUGIN_ADDITIONAL_BUTTONS1'" then=", %TINYMCEPLUGIN_ADDITIONAL_BUTTONS1%" }%", "theme_advanced_buttons2" : "%IF{ "defined 'TINYMCEPLUGIN_BUTTONS2'" then="%TINYMCEPLUGIN_BUTTONS2%" else="%STARTSECTION{"BUTTONS2"}%tablecontrols, separator, attach, image, charmap, hr, separator, restoredraft, fullscreen, code, hide%ENDSECTION{"BUTTONS2"}%" }%%IF{ "defined 'TINYMCEPLUGIN_ADDITIONAL_BUTTONS2'" then=", %TINYMCEPLUGIN_ADDITIONAL_BUTTONS2%" }%", "theme_advanced_buttons3" : "%IF{ "defined 'TINYMCEPLUGIN_BUTTONS3'" then="%TINYMCEPLUGIN_BUTTONS3%" }%%IF{ "defined 'TINYMCEPLUGIN_ADDITIONAL_BUTTONS3'" then=", %TINYMCEPLUGIN_ADDITIONAL_BUTTONS3%" }%", "autosave_interval" : "%IF{ "defined 'TINYMCEPLUGIN_AUTOSAVE_INTERVAL'" then="%TINYMCEPLUGIN_AUTOSAVE_INTERVAL%" else="%STARTSECTION{"AUTOSAVE_INTERVAL"}%180s%ENDSECTION{"AUTOSAVE_INTERVAL"}%" }%", "autosave_retention" : "%IF{ "defined 'TINYMCEPLUGIN_AUTOSAVE_RETENTION'" then="%TINYMCEPLUGIN_AUTOSAVE_RETENTION%" else="%STARTSECTION{"AUTOSAVE_RETENTION"}%4320m%ENDSECTION{"AUTOSAVE_RETENTION"}%" }%", "entity_encoding" : "%IF{ "defined 'TINYMCEPLUGIN_ENTITY_ENCODING'" then="%TINYMCEPLUGIN_ENTITY_ENCODING%" else="%STARTSECTION{"ENTITY_ENCODING"}%numeric%ENDSECTION{"ENTITY_ENCODING"}%" }%", "theme_advanced_toolbar_location" : "top", "theme_advanced_resize_horizontal" : false, "theme_advanced_resizing" : true, "theme_advanced_path" : false, "theme_advanced_statusbar_location" : "none", "skin" : "%IF{ "defined 'TINYMCEPLUGIN_MCESKIN'" then="%TINYMCEPLUGIN_MCESKIN%" else="%STARTSECTION{"MCESKIN"}%o2k7%ENDSECTION{"MCESKIN"}%" }%", %IF{ "defined 'TINYMCEPLUGIN_MCESKIN_VARIANT' AND $'TINYMCEPLUGIN_MCESKIN_VARIANT'" then="\"skin_variant\" : \"%TINYMCEPLUGIN_MCESKIN_VARIANT%\",$n" else="%IF{ "NOT defined 'TINYMCEPLUGIN_MCESKIN' OR $'TINYMCEPLUGIN_MCESKIN'='o2k7'" then="\\"skin_variant\\" : \\"%STARTSECTION{"MCESKIN_VARIANT"}%silver%ENDSECTION{"MCESKIN_VARIANT"}%\\",$dollarn" }%" }%"keep_styles" : false, "content_css" : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/wysiwyg.css,%PUBURLPATH%/%SYSTEMWEB%/SkinTemplates/base.css,%FOSWIKI_STYLE_URL%,%FOSWIKI_COLORS_URL%" %ENDSECTION{"TINYMCEPLUGIN_INIT"}%
TINYMCEPLUGIN_INIT_TOPIC
variable to point to the newly created topic, Eg. in SitePreferences or any WebPreferences:* Set TINYMCEPLUGIN_INIT_TOPIC = %USERSWEB%.TinyMCEPlugin
Variable | Default | Description |
---|---|---|
TINYMCEPLUGIN_INIT |
- | A string holding the TinyMCE initialisation object. If set, TINYMCEPLUGIN_INIT_TOPIC is ignored |
TINYMCEPLUGIN_INIT_TOPIC |
System.TinyMCEPlugin | The fully qualified Web.Topic containing a section named INIT which holds the TinyMCE initialisation parameters |
TINYMCEPLUGIN_MCEPLUGINS |
contextmenu, table, searchreplace, autosave, paste, legacyoutput, inlinepopups, fullscreen, -foswiki, -foswikibuttons, -foswikiimage | Comma separated list of TinyMCE plugins to initialise |
TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS |
Comma separated list of additional TinyMCE plugins to initialise. | |
TINYMCEPLUGIN_BUTTONS1 |
foswikiformat, separator, bold, italic, tt, colour, removeformat, separator, bullist, numlist, fwexdent, fwindent, blockquote, separator, link, unlink, anchor, separator, undo, redo, separator, search, replace | Comma separated list of toolbar buttons (in order) for the first, second and third rows (of buttons) |
TINYMCEPLUGIN_BUTTONS2 |
tablecontrols, separator, attach, image, charmap, hr, separator, restoredraft, fullscreen, code, hide | |
TINYMCEPLUGIN_BUTTONS3 |
||
TINYMCEPLUGIN_ADDITIONAL_BUTTONS1, TINYMCEPLUGIN_ADDITIONAL_BUTTONS2, TINYMCEPLUGIN_ADDITIONAL_BUTTONS3 |
Comma separated list of toolbar buttons (in order) to be appended to the end of a button row | |
TINYMCEPLUGIN_AUTOSAVE_RETENTION |
4320m | Autosave drafts stored in the web browser are expired after this length of time (minutes or seconds). See autosave plugin notes |
TINYMCEPLUGIN_AUTOSAVE_INTERVAL |
180s | Frequency (in minutes or seconds) that the autosave plugin updates the draft stored in the web browser |
TINYMCEPLUGIN_INIT_browser |
See Browser Specific Settings below | Add extra parameters to TINYMCEPLUGIN_INIT string for a specific _browser |
TINYMCEPLUGIN_DISABLE |
0 | If set to 1, disables TinyMCEPlugin. Please use NOWYSIWYG instead |
NOWYSIWYG |
0 | If this global setting is set to 1, TinyMCEPlugin (and all other WYSIWYG editors) will be disabled. |
TINYMCEPLUGIN_BAD_BROWSERS |
(?i-xsm:Konqueror) |
A regular expression that matches the user-agent string of any browser for which TinyMCE should not be loaded. |
TINYMCEPLUGIN_DEBUG |
0 | If set to 1, the uncompressed version of TinyMCE Javascript and CSS sources will be loaded by the browser. Useful for debugging. |
TINYMCEPLUGIN_ENTITY_ENCODING |
numeric | Controls how entities/characters get processed by TinyMCE. Allowed values: named, numeric, raw |
TINYMCEPLUGIN_MCESKIN |
o2k7 | The TinyMCE skin to use. Possible values: default, highcontrast, o2k7 |
TINYMCEPLUGIN_MCESKIN_VARIANT |
silver | A TinyMCE skin may have variants. o2k7 skin has silver and black variants. |
* Set TINYMCEPLUGIN_INIT_MSIE = "paste_auto_cleanup_on_paste" : falseThe defaults are:
MSIE => '', OPERA => '', GECKO => '"gecko_spellcheck" : true', SAFARI => '', CHROME => '', UNKNOWN => '',
Plugin Name | Toolbar buttons | Description | Notes | |
---|---|---|---|---|
autosave | restoredraft | 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 |
|
contextmenu | Provides context (right-click) menu capability | Allows the table plugin to offer copy & paste of rows & columns |
||
foswiki |
- | Fixup TinyMCE bugs, Foswiki integration issues | init param foswiki_autosave_no_fixup prevents fixup of autosave plugin if true; only works if foswiki is after autosave in the plugins list |
|
foswikibuttons |
tt, colour, attach, hide | Provides toolbar buttons, dialogues and formatting styles for Foswiki | List of formats populated from foswikibuttons_formats init param; ms of cursor idle time required before update of toolbar buttons/format state is set from foswikibuttons_cursoridletime param |
|
foswikiimage |
image | Provides image toolbar button, dialogue for Foswiki | ||
fullscreen | fullscreen | Provides fullscreen capability | ||
legacyoutput | Maintains compatibility for <font> , <u> , <b> , <strike> etc. tags |
|||
paste | pastetext, pasteword, selectall | "Cleans" content pasted from clipboard; useful when pasting from MS Office | ||
searchreplace | search, replace | Refer to TinyMCE documentation | ||
table | tablecontrols, others | Refer to TinyMCE documentation |
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:
---++ TinyMCE customisations * Set TINYMCEPLUGIN_ADDITIONAL_MCEPLUGINS = emotions, wordcount * Set TINYMCEPLUGIN_ADDITIONAL_BUTTONS2 = emotionsSome notable plugins:
Plugin Name | Toolbar buttons | Description | Notes |
---|---|---|---|
autoresize | - | Automatically resizes the editor to the content inside it | |
emotions | emotions | Insert smiley images into the TinyMCE editable area | |
iespell | iespell | Provides spell check for Internet Explorers | |
insertdatetime | insertdate, inserttime | Provides buttons to insert customised date and time strings | |
media | media | Handles embedded media such as QuickTime, Flash, ShockWave, RealPlayer and Windows Media Player | Requires customisation of edit templates |
spellchecker | spellchecker | Adds spellchecker functionality to TinyMCE by providing a new button that performs a AJAX call to a backend PHP page that uses PSpell/ASpell or Google spellchecker | |
style | styleprops | Adds CSS style editing support to TinyMCE, this will enable you to edit almost any CSS style property in a visual way. | Generally, HTML/CSS markup in topics is not desirable |
visualchars | visualchars | Adds the possibility to see invisible characters like |
|
wordcount | - | Display the number of words down in the right corner of the editor. | |
xhtmlxtras | cite, ins, del, abbr, acronym | Adds support for some XHTML elements, including cite, ins, del, abbr, and acronym. | Generally, XHTML markup in topics is not desirable. Foswiki plugins exist to provide similar functions with more friendly TML markup |
TINYMCEPLUGIN_INIT
string needs to be built differently, due to the API change affecting the way custom formats are applied in TinyMCE 3.3.x since 3.2.x
If a customised TINYMCEPLUGIN_INIT
string is in use, it should be re-built based on the content of this documentation. The customisations should be reviewed to determine if they are still necessary.
<p/>
above the table
Š
or Š
) TINYMCEPLUGIN_ENTITY_ENCODING
setting to raw
. It's possible this may cause problems on older browsers.
Cols
and Rows
, delete/reset all content from the fields on the 'General' and 'Advanced' tabs.
11 Feb 2019: | |
|||||||||
25 Jan 2017: | |
|||||||||
1.30 | |
|||||||||
21 Dec 2012 (TBD) | |
|||||||||
29 Oct 2012 (TBD) | |
|||||||||
1.2.9 | |
|||||||||
1.2.8 | |
|||||||||
1.2.7 | Foswikitaks:Item11722: Add watermark for hidden blocks |
|||||||||
23 Mar 2012 (1.2.6) | <del> , <s> tags are lost in WYSIWYG transition |
|||||||||
22 Dec 2011 (1.2.5) | |
|||||||||
19 Dec 2011 (1.2.4) | |
|||||||||
22 Nov 2011 (1.2.3) | |
|||||||||
08 Nov 2011 (1.2.2) | |
|||||||||
24 Sep 2011 (1.2.1) | |
|||||||||
20 Aug 2011 (1.2.0) | |
|||||||||
05 Dec 2011 (1.1.12) | |
|||||||||
22 Nov 2011 (1.1.11) | |
|||||||||
10 May 2011 (1.1.10) | |
|||||||||
09 May 2011 (1.1.9) | |
|||||||||
11 Apr 2011 (1.1.8) | Version released with Foswiki 1.1.3. Only a minor change related to how the plugin is being upgraded | |||||||||
19 Jan 2011 (1.1.7) | x.y.z version numbering TINYMCEPLUGIN_ENTITY_ENCODING setting; default to numeric |
|||||||||
04 Nov 2010 | |
|||||||||
25 Oct 2010 | |
|||||||||
28 Sep 2010 | |
|||||||||
01 Jul 2010 | |
|||||||||
28 Jun 2010 | TINYMCEPLUGIN_INIT in favour of TINYMCEPLUGIN_INIT_TOPIC sections%AQUA% colour in the colours dialogue; grouped standard colours separate to extended colours |
|||||||||
20 Mar 2010 | |
|||||||||
05 Mar 2010 | |
|||||||||
19 Feb 2010 | |
|||||||||
24 Jan 2010 | |
|||||||||
29 Dec 2009 | |
|||||||||
25 Nov 2009 | |
|||||||||
09 Nov 2009 | |
|||||||||
29 Oct 2009 | paste_auto_cleanup_on_paste : true for MSIE browsers (TinyMCE now defaults to true for all browsers) |
|||||||||
21 Oct 2009 | |
|||||||||
18 Oct 2009 | |
|||||||||
17 Oct 2009 | |
|||||||||
20 Sep 2009 | |
|||||||||
19 Sep 2009 | |
|||||||||
18 Sep 2009 | |
|||||||||
03 Jul 2009 | |
|||||||||
06 Jun 2009 | |
|||||||||
24 May 2009 | |
|||||||||
10 Apr 2009 | |
|||||||||
03 Apr 2009 | |
|||||||||
15 Mar 2009 | |
|||||||||
21 Jan 2009 | |
|||||||||
06 Dec 2008 | |
|||||||||
03 Dec 2008 | Crawford Currie re-released for the Foswiki project | |||||||||
03 Aug 2008 | TWiki 4.2.1 release version | |||||||||
04 May 2008 | |
|||||||||
12 Apr 2008 | |
|||||||||
31 Mar 2008 | |
|||||||||
28 Mar 2008 | |
|||||||||
25 Jan 2008 | |
|||||||||
24 Jan 2008 | |
|||||||||
20 Dec 2007 | |
|||||||||
19 Nov 2007 | |
|||||||||
16 Sep 2007 | |
|||||||||
13 Sep 2007 | |
|||||||||
12 Sep 2007 | |
|||||||||
11 Sep 2007 | |
|||||||||
07 Sep 2007 | |
|||||||||
06 Sep 2007 | |
|||||||||
04 Sep 2007 | |
|||||||||
14679 | |
|||||||||
14668 | Bugfixes and refinements done as part of 4.2 release | |||||||||
14543 | Added PROTECTED style, to allow protection of special text. Disable on unsupported browsers (untested) | |||||||||
14538 | First release | |||||||||
Dependencies: |
|