Skip to content
Patabugen edited this page Apr 7, 2013 · 15 revisions

Plugins

The WYMeditor includes a simple plugin which demonstrates how easy it is to write plugins for WYMeditor. See Plugin-system-hooks for more details.

Note: Next versions will use a more advanced events handling architecture which will allow a better interaction between plugins and the editor.

Using a plugin

To use a plugin you need to include it's script file using a <script> tag and then initialize it (passing an instance of wym) in the postInit function, passed as an option when you call $().wymeditor().

postInit: function(wym) {
  //activate the 'tidy' plugin, which cleans up the HTML
  //'wym' is the WYMeditor instance
  var wymtidy = wym.tidy();
  // You may also need to run some init functions on the plugin, however this depends on the plugin.
  wymtidy.init(wym);
}

Writing your own plugins

See Writing Plugins for more info on creating your own plugins.

Plugins include in the download

embed

Add Description

fullscreen

Add Description

hovertools

This plugin improves visual feedback by:

  • displaying a tool's title in the status bar while the mouse hovers over it.
  • changing background color of elements which match a condition, i.e. on which a class can be applied.

list

Add Description

rdfa

Add Description

resizable

Add Description

table

Add Description

tidy

Add Description

List of third party plugins

modal_dialog (by samuelcole)

http://trac.wymeditor.org/trac/attachment/ticket/63/jquery.wymeditor.modal_dialog.js New URL https://github.com/samuelcole/modal_dialog

Replaces the default dialog behaiour (new window) with a modal dialog. Known bug in IE, more information here: http://trac.wymeditor.org/trac/ticket/63 New URL https://github.com/wymeditor/wymeditor/issues/67

alignment (by Patabugen)

https://bitbucket.org/Patabugen/wymeditor-plugins/src

Set Text Alignment with classes.

site_links (by Patabugen)

https://bitbucket.org/Patabugen/wymeditor-plugins/src

A plugin to add a dropdown of links to the Links dialog, especially for making it easier to link to your own site (or any other predefined set).

Can also add a File Upload form to let you upload files right from the Link dialog.

image_float (by Patabugen)

https://bitbucket.org/Patabugen/wymeditor-plugins/src

Float images with classes.

image_upload (by Patabugen)

https://bitbucket.org/Patabugen/wymeditor-plugins/src

Adds an Image Upload form to the Insert Image dialog.

Catch Paste

Force automatic "Paste From Word" usage so that all pasted content is properly cleaned.

http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=676