From 081076f2e9698979cb93b26d9ecea022d236ecf5 Mon Sep 17 00:00:00 2001 From: azaozz Date: Sat, 5 Nov 2011 16:00:38 +0000 Subject: [PATCH] Improve handling of init and adding buttons to Quicktags, fixes #19098 git-svn-id: http://svn.automattic.com/wordpress/trunk@19172 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 26 +++----- wp-includes/js/quicktags.dev.js | 101 +++++++++++--------------------- wp-includes/js/quicktags.js | 2 +- wp-includes/script-loader.php | 2 +- 4 files changed, 45 insertions(+), 86 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 4e4d67477..df7259283 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -139,35 +139,25 @@ class WP_Editor { $first_run = false; if ( $this->this_quicktags ) { - $qt_buttons = array(); $qtInit = array( 'id' => $editor_id, - 'buttons' => '', - 'disabled_buttons' => '' + 'buttons' => '' ); if ( is_array($set['quicktags']) ) $qtInit = array_merge($qtInit, $set['quicktags']); - $qtInit = apply_filters( 'quicktags_settings', $qtInit, $editor_id ); - - $this->qt_settings[$editor_id] = $qtInit; - - if ( !empty($qtInit['buttons']) || !empty($qtInit['disabled_buttons']) ) { - if ( strpos( ',' . $qtInit['buttons'] . ',', ',link,' ) !== false ) - $qt_buttons[] = 'link'; - - if ( strpos( ',' . $qtInit['disabled_buttons'] . ',', ',link,' ) !== false ) - $qt_buttons = array(); - } else { - $qt_buttons[] = 'link'; - } + if ( empty($qtInit['buttons']) ) + $qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close'; if ( $set['dfw'] ) - $qt_buttons[] = 'fullscreen'; + $qtInit['buttons'] .= ',fullscreen'; - $this->qt_buttons = array_merge( $this->qt_buttons, $qt_buttons ); + $qtInit = apply_filters('quicktags_settings', $qtInit, $editor_id); + $this->qt_settings[$editor_id] = $qtInit; + + $this->qt_buttons = array_merge( $this->qt_buttons, explode(',', $qtInit['buttons']) ); } if ( $this->this_tinymce ) { diff --git a/wp-includes/js/quicktags.dev.js b/wp-includes/js/quicktags.dev.js index 8c512b190..bf367fe80 100644 --- a/wp-includes/js/quicktags.dev.js +++ b/wp-includes/js/quicktags.dev.js @@ -7,19 +7,15 @@ * Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties: * settings = { * id : 'my_id', // the HTML ID of the textarea, required - * buttons: '', // Comma separated list of the names of the default buttons to show. Optional. + * buttons: '' // Comma separated list of the names of the default buttons to show. Optional. * // This overwrites buttons order and any buttons added by plugins. * // Current list of default button names: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close' - * disabled_buttons : '' // Comma separated list of the names of the buttons to disable. * } * * The settings can also be a string quicktags_id. * * quicktags_id The ID of the textarea that will be the editor canvas - * buttons Comma separated list of the buttons IDs that will be shown. Buttons added by plugins - * will not show. Default: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close' - * disabled_buttons Comma separated list of the buttons IDs that should be excluded. Buttons - * added by plugins will show unless specifically disabled. + * buttons Comma separated list of the buttons IDs that will be shown. Buttons added from JavaScript by plugins will not show. */ // new edit toolbar used with permission @@ -147,8 +143,6 @@ function edButton(id, display, tagStart, tagEnd, access, open) { zeroise( now.getUTCSeconds() ) + '+00:00'; })(), - - _customButtons = {}, qt; qt = QTags = function(settings) { @@ -192,7 +186,7 @@ function edButton(id, display, tagStart, tagEnd, access, open) { var target = e.target || e.srcElement, i; // as long as it has the class ed_button, execute the callback - if ( /\s+ed_button\s+/.test(' ' + target.className + ' ' ) ) { + if ( / ed_button /.test(' ' + target.className + ' ') ) { // we have to reassign canvas here t.canvas = canvas = document.getElementById(id); i = target.id.replace(name + '_', ''); @@ -226,66 +220,39 @@ function edButton(id, display, tagStart, tagEnd, access, open) { qt.instances = {}; - qt.registerButton = function(id, btnClass) { - _customButtons[id] = btnClass; - }; - qt.getInstance = function(id) { return qt.instances[id]; }; qt._buttonsInit = function() { - var t = this, instance, canvas, name, settings, buttons, theButtons, html, id, i, qb, btn; + var t = this, canvas, name, settings, theButtons, html, inst, ed, id, i, use = '', + defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close,'; - for ( id in t.instances ) { - if ( id == 0 ) + for ( inst in t.instances ) { + if ( inst == 0 ) continue; - instance = t.instances[id]; - canvas = instance.canvas; - name = instance.name; - settings = instance.settings; + ed = t.instances[inst]; + canvas = ed.canvas; + name = ed.name; + settings = ed.settings; html = ''; - buttons = {}; theButtons = {}; // set buttons + if ( settings.buttons ) + use = ','+settings.buttons+','; + for ( i in edButtons ) { if ( !edButtons[i] ) continue; - buttons[edButtons[i].id] = edButtons[i]; - } + id = edButtons[i].id; + if ( use && defaults.indexOf(','+id+',') != -1 && use.indexOf(','+id+',') == -1 ) + continue; - if ( id == 'content' && typeof(adminpage) == 'string' && ( adminpage == 'post-new-php' || adminpage == 'post-php' ) ) - buttons['fullscreen'] = new qt.FullscreenButton(); - - // add custom buttons - for ( i in t._customButtons ) { - if ( !buttons[i] ) - buttons[i] = new t._customButtons[i](); - } - - if ( settings.buttons ) { - qb = settings.buttons.split(','); - - for ( i in qb ) { - btn = qb[i]; - if ( buttons[btn] ) - theButtons[btn] = buttons[btn]; - } - } else { - theButtons = buttons; - } - - if ( settings.disabled_buttons ) { - qb = settings.disabled_buttons.split(','); - - for ( i in qb ) { - btn = qb[i]; - if ( theButtons[btn] ) - delete(theButtons[btn]); - } + if ( !edButtons[i].instance || edButtons[i].instance == inst ) + theButtons[id] = edButtons[i]; } for ( i in theButtons ) { @@ -295,8 +262,8 @@ function edButton(id, display, tagStart, tagEnd, access, open) { html += theButtons[i].html(name + '_'); } - instance.toolbar.innerHTML = html; - instance.theButtons = theButtons; + ed.toolbar.innerHTML = html; + ed.theButtons = theButtons; } t.buttonsInitDone = true; }; @@ -315,18 +282,19 @@ function edButton(id, display, tagStart, tagEnd, access, open) { * * Minimum required to add a button that inserts a tag: * QTags.addButton( 'my_id', 'my button', '', '' ); - * QTags.addButton( 'my_id', 'my button', '
' ); + * QTags.addButton( 'my_id2', 'my button', '
' ); * * @param id string required Button HTML ID * @param display string required Button's value="..." * @param arg1 string || function required Either a starting tag to be inserted like "" or a callback that is executed when the button is clicked. - * @param arg2 string Ending tag like "" - * @param access_key string Access key for the button - * @param title string Button's title="..." - * @param priority int Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc. - * @return mixed null or the button object that is needed for back-compat. The common method of adding a button was to manually add it to the buttons array. + * @param arg2 string optional Ending tag like "" + * @param access_key string optional Access key for the button. + * @param title string optional Button's title="..." + * @param priority int optional Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc. + * @param instance string optional Limit the button to a specifric instance of Quicktags, add to all instances if not present. + * @return mixed null or the button object that is needed for back-compat. */ - qt.addButton = function( id, display, arg1, arg2, access_key, title, priority ) { + qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) { var btn; if ( !id || !display ) @@ -336,10 +304,10 @@ function edButton(id, display, tagStart, tagEnd, access, open) { arg2 = arg2 || ''; if ( typeof(arg1) === 'function' ) { - btn = new qt.Button(id, display, access_key, title); + btn = new qt.Button(id, display, access_key, title, instance); btn.callback = arg1; } else if ( typeof(arg1) === 'string' ) { - btn = new qt.TagButton(id, display, arg1, arg2, access_key, title); + btn = new qt.TagButton(id, display, arg1, arg2, access_key, title, instance); } else { return; } @@ -392,12 +360,13 @@ function edButton(id, display, tagStart, tagEnd, access, open) { }; // a plain, dumb button - qt.Button = function(id, display, access, title) { + qt.Button = function(id, display, access, title, instance) { var t = this; t.id = id; t.display = display; t.access = access; t.title = title || ''; + t.instance = instance || ''; }; qt.Button.prototype.html = function(idPrefix) { var access = this.access ? ' accesskey="' + this.access + '"' : ''; @@ -406,9 +375,9 @@ function edButton(id, display, tagStart, tagEnd, access, open) { qt.Button.prototype.callback = function(){}; // a button that inserts HTML tag - qt.TagButton = function(id, display, tagStart, tagEnd, access, title) { + qt.TagButton = function(id, display, tagStart, tagEnd, access, title, instance) { var t = this; - qt.Button.call(t, id, display, access, title); + qt.Button.call(t, id, display, access, title, instance); t.tagStart = tagStart; t.tagEnd = tagEnd; }; diff --git a/wp-includes/js/quicktags.js b/wp-includes/js/quicktags.js index f373bba6e..476dca08a 100644 --- a/wp-includes/js/quicktags.js +++ b/wp-includes/js/quicktags.js @@ -1 +1 @@ -var QTags,edButtons=[],edCanvas,edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,a,"",-1)}(function(){var c=function(h){var g,f,e;if(typeof jQuery!="undefined"){jQuery(document).ready(h)}else{g=c;g.funcs=[];g.ready=function(){if(!g.isReady){g.isReady=true;for(f=0;f0){while(typeof(edButtons[h])!="undefined"){h++}edButtons[h]=g}else{edButtons[edButtons.length]=g}if(this.buttonsInitDone){this._buttonsInit()}};d.insertContent=function(h){var i,g,f,j,k,e=document.getElementById(wpActiveEditor);if(!e){return false}if(document.selection){e.focus();i=document.selection.createRange();i.text=h;e.focus()}else{if(e.selectionStart||e.selectionStart=="0"){k=e.value;g=e.selectionStart;f=e.selectionEnd;j=e.scrollTop;e.value=k.substring(0,g)+h+k.substring(f,k.length);e.focus();e.selectionStart=g+h.length;e.selectionEnd=g+h.length;e.scrollTop=j}else{e.value+=h;e.focus()}}return true};d.Button=function(i,g,e,h){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||""};d.Button.prototype.html=function(f){var e=this.access?' accesskey="'+this.access+'"':"";return''};d.Button.prototype.callback=function(){};d.TagButton=function(k,i,g,f,e,j){var h=this;d.Button.call(h,k,i,e,j);h.tagStart=g;h.tagEnd=f};d.TagButton.prototype=new d.Button();d.TagButton.prototype.openTag=function(h,f){var g=this;if(!f.openTags){f.openTags=[]}if(g.tagEnd){f.openTags.push(g.id);h.value="/"+h.value}};d.TagButton.prototype.closeTag=function(j,f){var h=this,g=h.isOpen(f);if(g!==false){f.openTags.splice(g,1)}j.value=h.display};d.TagButton.prototype.isOpen=function(e){var h=this,g=0,f=false;if(e.openTags){while(f===false&&g0){if(!w.tagEnd){g.text=g.text+w.tagStart}else{g.text=w.tagStart+g.text+m}}else{if(!w.tagEnd){g.text=w.tagStart}else{if(w.isOpen(q)===false){g.text=w.tagStart;w.openTag(p,q)}else{g.text=m;w.closeTag(p,q)}}}j.focus()}else{if(j.selectionStart||j.selectionStart=="0"){s=j.selectionStart;f=j.selectionEnd;n=f;h=j.scrollTop;k=u.substring(0,s);e=u.substring(f,u.length);o=u.substring(s,f);if(s!=f){if(!w.tagEnd){j.value=k+o+w.tagStart+e;n+=w.tagStart.length}else{j.value=k+w.tagStart+o+m+e;n+=w.tagStart.length+m.length}}else{if(!w.tagEnd){j.value=k+w.tagStart+e;n=s+w.tagStart.length}else{if(w.isOpen(q)===false){j.value=k+w.tagStart+e;w.openTag(p,q);n=s+w.tagStart.length}else{j.value=k+m+e;n=s+m.length;w.closeTag(p,q)}}}j.focus();j.selectionStart=n;j.selectionEnd=n;j.scrollTop=h}else{if(!m){j.value+=w.tagStart}else{if(w.isOpen(q)!==false){j.value+=w.tagStart;w.openTag(p,q)}else{j.value+=m;w.closeTag(p,q)}}j.focus()}}};d.SpellButton=function(){d.Button.call(this,"spell",quicktagsL10n.lookup,"",quicktagsL10n.dictionaryLookup)};d.SpellButton.prototype=new d.Button();d.SpellButton.prototype.callback=function(i,h,e){var k="",j,g,f;if(document.selection){h.focus();j=document.selection.createRange();if(j.text.length>0){k=j.text}}else{if(h.selectionStart||h.selectionStart=="0"){g=h.selectionStart;f=h.selectionEnd;if(g!=f){k=h.value.substring(g,f)}}}if(k===""){k=prompt(quicktagsL10n.wordLookup,"")}if(k!==null&&/^\w[\w ]*$/.test(k)){window.open("http://www.answers.com/"+encodeURIComponent(k))}};d.CloseButton=function(){d.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};d.CloseButton.prototype=new d.Button();d._close=function(j,k,f){var h,g,i=f.openTags;if(i){while(i.length>0){h=f.getButton(i[i.length-1]);g=document.getElementById(f.name+"_"+h.id);h.callback.call(h,g,k,f)}}};d.CloseButton.prototype.callback=d._close;d.closeAllTags=function(f){var e=this.getInstance(f);d._close("",e.canvas,e)};d.LinkButton=function(){d.TagButton.call(this,"link","link","","","a")};d.LinkButton.prototype=new d.TagButton();d.LinkButton.prototype.callback=function(j,k,h,g){var f,i=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!g){g="http://"}if(i.isOpen(h)===false){f=prompt(quicktagsL10n.enterURL,g);if(f){i.tagStart='';d.TagButton.prototype.callback.call(i,j,k,h)}}else{d.TagButton.prototype.callback.call(i,j,k,h)}};d.ImgButton=function(){d.TagButton.call(this,"img","img","","","m")};d.ImgButton.prototype=new d.TagButton();d.ImgButton.prototype.callback=function(i,k,g,f){if(!f){f="http://"}var j=prompt(quicktagsL10n.enterImageURL,f),h;if(j){h=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart=''+h+'';d.TagButton.prototype.callback.call(this,i,k,g)}};d.FullscreenButton=function(){d.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};d.FullscreenButton.prototype=new d.Button();d.FullscreenButton.prototype.callback=function(f,g){if(g.id!="content"||typeof(fullscreen)=="undefined"){return}fullscreen.on()};edButtons[10]=new d.TagButton("strong","b","","","b");edButtons[20]=new d.TagButton("em","i","","","i"),edButtons[30]=new d.LinkButton(),edButtons[40]=new d.TagButton("block","b-quote","\n\n
","
\n\n","q"),edButtons[50]=new d.TagButton("del","del",'',"","d"),edButtons[60]=new d.TagButton("ins","ins",'',"","s"),edButtons[70]=new d.ImgButton(),edButtons[80]=new d.TagButton("ul","ul","
    \n","
\n\n","u"),edButtons[90]=new d.TagButton("ol","ol","
    \n","
\n\n","o"),edButtons[100]=new d.TagButton("li","li","\t
  • ","
  • \n","l"),edButtons[110]=new d.TagButton("code","code","","","c"),edButtons[120]=new d.TagButton("more","more","","","t"),edButtons[130]=new d.SpellButton(),edButtons[140]=new d.CloseButton()})(); \ No newline at end of file +var QTags,edButtons=[],edCanvas,edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,a,"",-1)}(function(){var b=function(g){var f,e,d;if(typeof jQuery!="undefined"){jQuery(document).ready(g)}else{f=b;f.funcs=[];f.ready=function(){if(!f.isReady){f.isReady=true;for(e=0;e0){while(typeof(edButtons[k])!="undefined"){k++}edButtons[k]=f}else{edButtons[edButtons.length]=f}if(this.buttonsInitDone){this._buttonsInit()}};c.insertContent=function(g){var h,f,e,i,j,d=document.getElementById(wpActiveEditor);if(!d){return false}if(document.selection){d.focus();h=document.selection.createRange();h.text=g;d.focus()}else{if(d.selectionStart||d.selectionStart=="0"){j=d.value;f=d.selectionStart;e=d.selectionEnd;i=d.scrollTop;d.value=j.substring(0,f)+g+j.substring(e,j.length);d.focus();d.selectionStart=f+g.length;d.selectionEnd=f+g.length;d.scrollTop=i}else{d.value+=g;d.focus()}}return true};c.Button=function(i,g,e,h,d){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||"";f.instance=d||""};c.Button.prototype.html=function(e){var d=this.access?' accesskey="'+this.access+'"':"";return''};c.Button.prototype.callback=function(){};c.TagButton=function(k,i,g,f,e,j,d){var h=this;c.Button.call(h,k,i,e,j,d);h.tagStart=g;h.tagEnd=f};c.TagButton.prototype=new c.Button();c.TagButton.prototype.openTag=function(g,d){var f=this;if(!d.openTags){d.openTags=[]}if(f.tagEnd){d.openTags.push(f.id);g.value="/"+g.value}};c.TagButton.prototype.closeTag=function(h,d){var g=this,f=g.isOpen(d);if(f!==false){d.openTags.splice(f,1)}h.value=g.display};c.TagButton.prototype.isOpen=function(d){var g=this,f=0,e=false;if(d.openTags){while(e===false&&f0){if(!u.tagEnd){f.text=f.text+u.tagStart}else{f.text=u.tagStart+f.text+k}}else{if(!u.tagEnd){f.text=u.tagStart}else{if(u.isOpen(p)===false){f.text=u.tagStart;u.openTag(o,p)}else{f.text=k;u.closeTag(o,p)}}}h.focus()}else{if(h.selectionStart||h.selectionStart=="0"){q=h.selectionStart;e=h.selectionEnd;m=e;g=h.scrollTop;j=s.substring(0,q);d=s.substring(e,s.length);n=s.substring(q,e);if(q!=e){if(!u.tagEnd){h.value=j+n+u.tagStart+d;m+=u.tagStart.length}else{h.value=j+u.tagStart+n+k+d;m+=u.tagStart.length+k.length}}else{if(!u.tagEnd){h.value=j+u.tagStart+d;m=q+u.tagStart.length}else{if(u.isOpen(p)===false){h.value=j+u.tagStart+d;u.openTag(o,p);m=q+u.tagStart.length}else{h.value=j+k+d;m=q+k.length;u.closeTag(o,p)}}}h.focus();h.selectionStart=m;h.selectionEnd=m;h.scrollTop=g}else{if(!k){h.value+=u.tagStart}else{if(u.isOpen(p)!==false){h.value+=u.tagStart;u.openTag(o,p)}else{h.value+=k;u.closeTag(o,p)}}h.focus()}}};c.SpellButton=function(){c.Button.call(this,"spell",quicktagsL10n.lookup,"",quicktagsL10n.dictionaryLookup)};c.SpellButton.prototype=new c.Button();c.SpellButton.prototype.callback=function(h,g,d){var j="",i,f,e;if(document.selection){g.focus();i=document.selection.createRange();if(i.text.length>0){j=i.text}}else{if(g.selectionStart||g.selectionStart=="0"){f=g.selectionStart;e=g.selectionEnd;if(f!=e){j=g.value.substring(f,e)}}}if(j===""){j=prompt(quicktagsL10n.wordLookup,"")}if(j!==null&&/^\w[\w ]*$/.test(j)){window.open("http://www.answers.com/"+encodeURIComponent(j))}};c.CloseButton=function(){c.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};c.CloseButton.prototype=new c.Button();c._close=function(i,j,d){var g,f,h=d.openTags;if(h){while(h.length>0){g=d.getButton(h[h.length-1]);f=document.getElementById(d.name+"_"+g.id);g.callback.call(g,f,j,d)}}};c.CloseButton.prototype.callback=c._close;c.closeAllTags=function(e){var d=this.getInstance(e);c._close("",d.canvas,d)};c.LinkButton=function(){c.TagButton.call(this,"link","link","","
    ","a")};c.LinkButton.prototype=new c.TagButton();c.LinkButton.prototype.callback=function(i,j,g,f){var d,h=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!f){f="http://"}if(h.isOpen(g)===false){d=prompt(quicktagsL10n.enterURL,f);if(d){h.tagStart='';c.TagButton.prototype.callback.call(h,i,j,g)}}else{c.TagButton.prototype.callback.call(h,i,j,g)}};c.ImgButton=function(){c.TagButton.call(this,"img","img","","","m")};c.ImgButton.prototype=new c.TagButton();c.ImgButton.prototype.callback=function(h,j,f,d){if(!d){d="http://"}var i=prompt(quicktagsL10n.enterImageURL,d),g;if(i){g=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart=''+g+'';c.TagButton.prototype.callback.call(this,h,j,f)}};c.FullscreenButton=function(){c.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};c.FullscreenButton.prototype=new c.Button();c.FullscreenButton.prototype.callback=function(d,f){if(f.id!="content"||typeof(fullscreen)=="undefined"){return}fullscreen.on()};edButtons[10]=new c.TagButton("strong","b","","","b");edButtons[20]=new c.TagButton("em","i","","","i"),edButtons[30]=new c.LinkButton(),edButtons[40]=new c.TagButton("block","b-quote","\n\n
    ","
    \n\n","q"),edButtons[50]=new c.TagButton("del","del",'',"","d"),edButtons[60]=new c.TagButton("ins","ins",'',"","s"),edButtons[70]=new c.ImgButton(),edButtons[80]=new c.TagButton("ul","ul","
      \n","
    \n\n","u"),edButtons[90]=new c.TagButton("ol","ol","
      \n","
    \n\n","o"),edButtons[100]=new c.TagButton("li","li","\t
  • ","
  • \n","l"),edButtons[110]=new c.TagButton("code","code","","","c"),edButtons[120]=new c.TagButton("more","more","","","t"),edButtons[130]=new c.SpellButton(),edButtons[140]=new c.CloseButton()})(); \ No newline at end of file diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 985444eb6..915965c9f 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -68,7 +68,7 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 ); - $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110919', 1 ); + $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20111105', 1 ); $scripts->add_script_data( 'quicktags', 'quicktagsL10n', array( 'wordLookup' => __('Enter a word to look up:'), 'dictionaryLookup' => esc_attr(__('Dictionary lookup')),