r6 - 29 Mar 2022 - 11:38:37 - TWikiGuestYou are here: TWiki >  TWiki Web > XinhaEditorPlugin
ANNUNCIO: L'aggiornamento dei pacchetti ISI produce importanti cambiamenti, leggete questa nota

Bee Wysiwyg Plugin

Support for the integration of WYSIWYG (What-You-See-Is-What-You-Get) editors. Based on Xinha html editor. 

  •  Install modules that this module depends on. Dependencies:
    NameVersionDescription
    HTML::ParserRequired. Available from CPAN.
    HTML::EntitiesRequired. Available from CPAN.
  • (Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
  • To enable the editor in one of your skins, add the following link to the skin alongside or in place of the existing 'edit' link:
    <a href="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/%TOPIC%?skin=bee">BeeWysiwyg</a>
    As you can see this is just a standard edit link with the 'bee' skin in place of the usual edit skin.

If you want to set up <nop>BeeWysiwyg  as your default editor, then you can set the EDIT_SKIN TWiki variable wherever you want.

  • Set EDIT_SKIN = bee

Set it in a user topic to set it for one user. Set it in WebPreferences to set it for a single web. Or set it in your global TWiki preferences to set it for your whole site!

Plugin Configuration Settings

  • The nameb of the skin used to invoke a Wysiwyg editor.
    • Set BEEWYSIWYGSKIN = bee
  • Web/Topic name of a help page. Change this to point to your local version of the help page, which is brought up when the .
    • Set HELPPAGE = TWiki/XinhaEditorPlugin

Editor control

The global TWiki Variable WYSIWYG_EXCLUDE can be set to make the plugin sensitive to what is in a topic before allowing it to be edited. You can set it up to refuse to edit if some or all of HTML tags (e.g. <br />), or simple variables (e.g. %VAR%) or calls (e.g. %VARIABLE{...}%), are used in the topic. If the plugin detects an excluded construct in the topic, it will redirect to the default editor. Comma-separated list of one or more of html, variables, calls, e.g.
  • Set BEEWYSIWYG_EXCLUDE = variables,calls

If you are using this plugin with TWiki-4.0.0 or later with pattern skin, the %COMPOSER% global TWiki variable is used to control the skin used for the WYSIWYG editor link. You can define this variable to the empty string to disable WYSIWYG editing on a site, per-web, per-user or per-topic basis.

Known Issues

Most of the known problems with the plugin are actually problems with the Xinha editor or the browser rather than the plugin.

Incompatible with "non-standard" syntax

XinhaEditorPlugin is Incompatible with plugins that expand non-standard syntax e.g. TWiki:Plugins.MathModePlugin (XinhaEditorPlugin)

Plugins that extend the syntax using TWiki variables, such as %MYVARIABLE%, should work fine.

Overlapping styles ( XinhaEditorPlugin)

Because TWiki uses a "best guess" approach to some formatting, it allows overlapping of tags in a way forbidden by HTML, it is impossible to guarantee 100% that formating in the original TWiki document will still be there when the same document is loaded and then saved through the XinhaEditorPlugin. The most obvious case of this is to do with styles. For example, the sentence
*bold _bold-italic* italic_
is legal in TML, but in HTML is represented by
<strong>bold <em>bold-italic</em></strong> <em>italic</em>
which gets translated back to TML as
*bold _bold-italic_* _italic_
which is correct by construction, but does not render correctly in TWiki. This problem is unfortunately unavoidable due to the way TWiki syntax works.

Support for PRE

Because of limitations in the browsers, the editor does not support PRE blocks. All PRE blocks will be converted to TWiki verbatim blocks on save. This can cause some confusion, especially when editor formatting controls (such as "bold") have been used to format text in a PRE block. Users are advised to use only plain text in PRE (verbatim) blocks.

Plugin Info

This plugin is heavily based on the Xinha editor, and the authors of that add-on are therefore also credited as authors of this plugin.

Dependencies:
NameVersionDescription
HTML::ParserRequired. Available from CPAN.
HTML::EntitiesRequired. Available from CPAN.
Perl Version: 5.0
Plugin Home: TWiki:Plugins/XinhaEditorPlugin
Feedback: TWiki:Plugins/XinhaEditorPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main.VasekDovrtel - 18:55:58 29 Mar 2022

 

This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.XinhaEditorPlugin