root / trunk / web / dojo / dojox / editor / plugins / ToolbarLineBreak.js
History | View | Annotate | Download (1.03 KB)
| 1 | 9 | andrej.cim | /*
|
|---|---|---|---|
| 2 | Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
||
| 3 | Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||
| 4 | see: http://dojotoolkit.org/license for details
|
||
| 5 | */
|
||
| 6 | |||
| 7 | |||
| 8 | if(!dojo._hasResource["dojox.editor.plugins.ToolbarLineBreak"]){ |
||
| 9 | dojo._hasResource["dojox.editor.plugins.ToolbarLineBreak"]=true; |
||
| 10 | dojo.provide("dojox.editor.plugins.ToolbarLineBreak");
|
||
| 11 | dojo.require("dijit._Widget");
|
||
| 12 | dojo.require("dijit._Templated");
|
||
| 13 | dojo.require("dijit._editor._Plugin");
|
||
| 14 | dojo.declare("dojox.editor.plugins._ToolbarLineBreak",[dijit._Widget,dijit._Templated],{templateString:"<span class='dijit dijitReset'><br></span>",postCreate:function(){ |
||
| 15 | dojo.setSelectable(this.domNode,false); |
||
| 16 | },isFocusable:function(){ |
||
| 17 | return false; |
||
| 18 | }}); |
||
| 19 | dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){ |
||
| 20 | if(o.plugin){
|
||
| 21 | return;
|
||
| 22 | } |
||
| 23 | var _1=o.args.name.toLowerCase();
|
||
| 24 | if(_1==="||"||_1==="toolbarlinebreak"){ |
||
| 25 | o.plugin=new dijit._editor._Plugin({button:new dojox.editor.plugins._ToolbarLineBreak(),setEditor:function(_2){ |
||
| 26 | this.editor=_2;
|
||
| 27 | }}); |
||
| 28 | } |
||
| 29 | }); |
||
| 30 | } |