source: Dev/trunk/src/client/dojox/editor/plugins/ToolbarLineBreak.js

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1define([
2        "dojo",
3        "dijit",
4        "dojox",
5        "dijit/_Widget",
6        "dijit/_TemplatedMixin",
7        "dijit/_editor/_Plugin",
8        "dojo/_base/declare"
9], function(dojo, dijit, dojox, _Widget, _TemplatedMixin, _Plugin, declare) {
10
11var ToolbarLineBreak = declare("dojox.editor.plugins.ToolbarLineBreak",
12        [ _Widget, _TemplatedMixin ],
13        {
14        // summary:
15        //              A 'line break' between two `dijit.Toolbar` items so that very
16        //              long toolbars can be organized a bit.
17        templateString: "<span class='dijit dijitReset'><br></span>",
18        postCreate: function(){
19                dojo.setSelectable(this.domNode, false);
20        },
21        isFocusable: function(){
22                // summary:
23                //              This widget isn't focusable, so pass along that fact.
24                // tags:
25                //              protected
26                return false;
27        }
28});
29
30
31// Register this plugin.
32dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
33        if(o.plugin){ return; }
34        var name = o.args.name.toLowerCase();
35        if(name ===  "||" || name === "toolbarlinebreak"){
36                o.plugin = new _Plugin({
37                        button: new ToolbarLineBreak(),
38                        setEditor: function(editor){
39                                this.editor = editor;
40                        }
41                });
42        }
43});
44
45return ToolbarLineBreak;
46
47});
Note: See TracBrowser for help on using the repository browser.