University of Natural Resources and Life Sciences (BOKU)
Institute of Computational Biology

internal package Foswiki::Plugins::WysiwygPlugin

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package WysiwygPlugin

This plugin is responsible for translating TML to HTML before an edit starts and translating the resultant HTML back into TML.

Note: In the case of a new topic, you might expect to see the "create topic" screen in the editor when it goes back to Foswiki for the topic content. This doesn't happen because the earliest possible handler is called on the topic content and not the template. The template is effectively ignored and a blank document is sent to the editor.

Attachment uploads can be handled by URL requests from the editor to the rest handler in this plugin. This avoids the need to add any scripts to the bin dir. You will have to use a form, though, as XmlHttpRequest does not support file uploads.

StaticMethod notWysiwygEditable($text) → $boolean

Determine if the given $text is WYSIWYG editable, based on the topic content and the value of the Foswiki preferences WYSIWYG_EXCLUDE and WYSIWYG_EDITABLE_CALLS. Returns a descriptive string if the text is not editable, 0 otherwise.

19 Mar 2024 - 06:55 Foswiki v2.0.2