Sha256: e3b742268569337fe7150fd5c04e58a64ba7693d0ce76cc590ec4c084d39e211
Contents?: true
Size: 1.5 KB
Versions: 7
Compression:
Stored size: 1.5 KB
Contents
(function(){CKEDITOR.dialog.add("esp_blockquote",function(b){function c(){}function a(){}return{title:"Class for Blockquote",minWidth:200,minHeight:50,onShow:function(){},onOk:function(){var o=b.getSelection(),m=o&&o.getRanges(true)[0],l=m.createIterator();var n=[];while((block=l.getNextParagraph())){n.push(block)}if(n.length<1){var r=b.document.createElement(b.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),e=bookmarks.shift();m.insertNode(r);r.append(new CKEDITOR.dom.text("\ufeff",b.document));m.moveToBookmark(e);m.selectNodeContents(r);m.collapse(true);e=m.createBookmark();n.push(r);bookmarks.unshift(e)}var g=n[0].getParent(),k=[];for(var j=0;j<n.length;j++){block=n[j];g=g.getCommonAncestor(block.getParent())}var h={table:1,tbody:1,tr:1,ol:1,ul:1};while(h[g.getName()]){g=g.getParent()}var f=null;while(n.length>0){block=n.shift();while(!block.getParent().equals(g)){block=block.getParent()}if(!block.equals(f)){k.push(block)}f=block}while(k.length>0){block=k.shift();if(block.getName()=="blockquote"){var q=new CKEDITOR.dom.documentFragment(b.document);while(block.getFirst()){q.append(block.getFirst().remove());n.push(q.getLast())}q.replace(block)}else{n.push(block)}}var d=b.document.createElement("blockquote");var p=this.getValueOf("info","klass0");if(p){d.setAttribute("class",p);if(CKEDITOR.env.ie){d.setAttribute("className",p)}}d.insertBefore(n[0]);while(n.length>0){block=n.shift();d.append(block)}},onHide:function(){},contents:[{id:"info",elements:[{type:"text",id:"klass0",label:"Class",commit:c,setup:a}]}]}})})();
Version data entries
7 entries across 7 versions & 1 rubygems