X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_form_HtmlEditor_ToolbarStandard.js.html;h=9820f063932a5903560bc9921e87318530024021;hb=e28295d9bf2622b5292557e0935b71b03f537647;hp=990f3f2b7b18c52b7f115e9abf1c8b01ced6e60a;hpb=c4ec853f8b86740a021ea3e6669f2d903878a229;p=roojs1 diff --git a/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html b/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html index 990f3f2b7b..9820f06393 100644 --- a/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html +++ b/docs/src/Roo_form_HtmlEditor_ToolbarStandard.js.html @@ -1,5 +1,4 @@ -Roo/form/HtmlEditor/ToolbarStandard.js// <script type="text/javascript"> -/* +Roo/form/HtmlEditor/ToolbarStandard.js/* * Based on * Ext JS Library 1.1.1 * Copyright(c) 2006-2007, Ext JS, LLC. @@ -8,9 +7,9 @@ */ /** - * @class Roo.form.HtmlEditorToolbar1 + * @class Roo.form.HtmlEditor.ToolbarStandard * Basic Toolbar - * + * Usage: * new Roo.form.HtmlEditor({ @@ -24,7 +23,7 @@ * * @cfg {Object} disable List of elements to disable.. - * @cfg {Array} btns List of additional buttons. + * @cfg {Roo.Toolbar.Item|Roo.Toolbar.Button|Roo.Toolbar.SplitButton|Roo.form.Field} btns[] List of additional buttons. * * * NEEDS Extra CSS? @@ -49,7 +48,7 @@ // dont call parent... till later. } -Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype, { +Roo.form.HtmlEditor.ToolbarStandard.prototype = { tb: false, @@ -395,7 +394,7 @@ tabIndex:-1 }); } - cmenu.menu.items.push({ + cmenu.menu.items.push({ actiontype : 'tablewidths', html: 'Remove Table Widths', handler: function(a,b) { @@ -447,7 +446,7 @@ actiontype : 'tidy', html: 'Tidy HTML Source', handler: function(a,b) { - editorcore.doc.body.innerHTML = editorcore.domToHTML(); + new Roo.htmleditor.Tidy(editorcore.doc.body); editorcore.syncValue(); }, tabIndex:-1 @@ -484,7 +483,7 @@ if (this.btns) { for(var i =0; i< this.btns.length;i++) { - var b = Roo.factory(this.btns[i],Roo.form); + var b = Roo.factory(this.btns[i],this.btns[i].xns || Roo.form); b.cls = 'x-edit-none'; if(typeof(this.btns[i].cls) != 'undefined' && this.btns[i].cls.indexOf('x-init-enable') !== -1){ @@ -525,12 +524,20 @@ }, // private used internally createLink : function(){ - Roo.log("create link?"); - var url = prompt(this.createLinkText, this.defaultLinkValue); - if(url && url != 'http:/'+'/'){ - this.editorcore.relayCmd('createlink', url); - } - }, + //Roo.log("create link?"); + var ec = this.editorcore; + (function() { + Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) { + if (btn != 'ok') { + return; + } + if(url && url != 'http:/'+'/'){ + ec.relayCmd('createlink', url); + } + }); + }).defer(100, this); // we have to defer this , otherwise the mouse click gives focus to the main window. + + }, /** @@ -642,6 +649,11 @@ this.tb.items.each(function(item){ item.enable(); }); + // initialize 'blocks' + Roo.each(Roo.get(this.editorcore.doc.body).query('*[data-block]'), function(e) { + Roo.htmleditor.Block.factory(e).updateElement(e); + },this); + } } @@ -768,7 +780,7 @@ item.enable(); }); } -}); +};