.. _dojox/editor/plugins/InsertEntity: dojox.editor.plugins.InsertEntity ================================= :Status: Draft :Version: 1.0 :Authors: Jared Jurkiewicz :Developers: Jared Jurkiewicz :Available: since V1.4 .. contents:: :depth: 2 Have you ever wanted to easily insert the copyright symbol, the trademark symbol, or any of a variety of mathematical symbols into the document you're editing in the dijit.Editor? If so, then this plugin is for you! This plugin provides a subset of entity characters that can be inserted into your documents. The symbols provided are primarily the non-ascii 8859 characters and a arge set of greek symbols used in mathematics. ======== Features ======== Once required in and enabled, this plugin provides the following features to dijit.Editor. * Button with icon in toolbar for inserting a symbol from a subset of entity characters at the current location in the document. * Keyboard hotkey: CTRL-SHIFT-S for inserting a symbol at the current location in the editor. (Note that this is a similar keybind to those used by commercial word processors, so it will hopefully be familiar and easy to pick up.). * A key-navigable grid of symbols to select the one to insert. ===== Usage ===== Basic Usage ----------- Usage of this plugin is quite simple and painless. The first thing you need to do is require into the page you're using the editor. This is done in the same spot all your dojo.require calls are made, usually a head script tag. For example: .. code-block :: javascript dojo.require("dijit.Editor"); dojo.require("dojox.editor.plugins.InsertEntity"); Once it has been required in, all you have to do is include it in the list of extraPlugins (or the plugins property if you're reorganizing the toolbar) for you want to load into the editor. For example: .. code-block :: html
You also need to include the CSS for it. For example: .. code-block :: html And that's it. The editor instance you can reference by 'dijit.byId("editor")' is now enabled with the InsertEntity plugin! You can use the button or hotkey to insert entity characters as you desire. =========== Limitations =========== Something to be aware of is that if you also use the :ref:`dojox.editor.plugin.PrettyPrintOne cell | Two cell |