| 1 |
define([ |
| 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 |
|
| 11 |
var ToolbarLineBreak = declare("dojox.editor.plugins.ToolbarLineBreak", |
| 12 |
[ _Widget, _TemplatedMixin ], |
| 13 |
{ |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
templateString: "<span class='dijit dijitReset'><br></span>", |
| 18 |
postCreate: function(){ |
| 19 |
dojo.setSelectable(this.domNode, false); |
| 20 |
}, |
| 21 |
isFocusable: function(){ |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
return false; |
| 27 |
} |
| 28 |
}); |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
dojo.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 |
|
| 45 |
return ToolbarLineBreak; |
| 46 |
|
| 47 |
}); |