Authors:Jared Jurkiewicz
Project owner:Jared Jurkiewicz

Have you ever wanted to insert a named location in your document (anchor), that people can link to using urls and hashes? If so, then this plugin is for you!


Once required in and enabled, this plugin provides the following features to dijit.Editor.

  • Button with icon in toolbar for inserting and editing anchors in your page
  • CSS styling in the edit view that indicates where anchors are The styles do not appear outside of the editor.


Basic Usage

Usage of this plugin is quite simple and painless.

First include the CSS for it:

@import "dojox/editor/plugins/resources/css/InsertAnchor.css";

Then require it into the page where you’re using the editor:


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:

<div data-dojo-type="dijit/Editor" id="editor" data-dojo-props="extraPlugins:['insertanchor']"></div>

And that’s it. The editor instance you can reference by ‘dijit.byId(“editor”)’ is now enabled with the InsertAnchor plugin! You can use the button insert and edit anchors in your page.


Basic Usage

@import "{{baseUrl}}dojox/editor/plugins/resources/css/InsertAnchor.css";
<b>Move the cursor around and select blockquote to blockquote a section of the document.</b>
<div data-dojo-type="dijit/Editor" height="250px" id="input" data-dojo-props="extraPlugins:['insertanchor']">
blah blah & blah!
<td style="border-style:solid; border-width: 2px; border-color: gray;">One cell</td>
<td style="border-style:solid; border-width: 2px; border-color: gray;">
Two cell
<li>item one</li>
item two
Error in the documentation? Can’t find what you are looking for? Let us know!