From aff28926463a270cf3965fec4f011eb4a5bf7e4f Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 17 Aug 2014 20:11:15 +0000 Subject: [PATCH] TinyMCE: fix the edit image and wpview buttons on touch screen PCs, fixes #29235. Built from https://develop.svn.wordpress.org/trunk@29521 git-svn-id: http://core.svn.wordpress.org/trunk@29297 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../js/tinymce/plugins/wpeditimage/plugin.js | 6 ++---- .../tinymce/plugins/wpeditimage/plugin.min.js | 2 +- .../js/tinymce/plugins/wpview/plugin.js | 11 +++++------ .../js/tinymce/plugins/wpview/plugin.min.js | 2 +- wp-includes/js/tinymce/wp-tinymce.js.gz | Bin 134109 -> 134131 bytes 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js index 93391b24af..21d2ca0d5d 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js @@ -549,8 +549,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { } if ( 'ontouchend' in document ) { - editor.on( 'touchend', edit ); - editor.on( 'click', function( event ) { var target = event.target; @@ -563,10 +561,10 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { event.stopPropagation(); } }); - } else { - editor.on( 'mouseup', edit ); } + editor.on( 'mouseup touchend', edit ); + editor.on( 'init', function() { var dom = editor.dom, captionClass = editor.getParam( 'wpeditimage_html5_captions' ) ? 'html5-captions' : 'html4-captions'; diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js index 0722c14490..b53aefcffa 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wpeditimage",function(a){function b(b){return b.replace(/(?:

)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(b,c,d){var e,f,g,h,i,j,k=tinymce.trim;return e=c.match(/id=['"]([^'"]*)['"] ?/),e&&(c=c.replace(e[0],"")),f=c.match(/align=['"]([^'"]*)['"] ?/),f&&(c=c.replace(f[0],"")),g=c.match(/class=['"]([^'"]*)['"] ?/),g&&(c=c.replace(g[0],"")),j=c.match(/width=['"]([0-9]*)['"] ?/),j&&(c=c.replace(j[0],"")),d=k(d),i=d.match(/((?:]+>)?]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=k(i[2]),i=k(i[1])):(h=k(c).replace(/caption=['"]/,"").replace(/['"]$/,""),i=d),e=e&&e[1]?e[1].replace(/[<>&]+/g,""):"",f=f&&f[1]?f[1]:"alignnone",g=g&&g[1]?" "+g[1].replace(/[<>&]+/g,""):"",!j&&i&&(j=i.match(/width=['"]([0-9]*)['"]/)),j&&j[1]&&(j=j[1]),j&&h?(j=parseInt(j,10),a.getParam("wpeditimage_html5_captions")||(j+=10),'

'+i+'
'+h+"
"):d})}function c(a){return a.replace(/
]*>([\s\S]+?)<\/div>/g,function(a,b){var c="";return-1===b.indexOf("]+>([\s\S]+?)<\/dd>/i),c&&c[1]?"

"+c[1]+"

":""):(c=b.replace(/
]+)>\s*
]+>([\s\S]+?)<\/dt>\s*
]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi,function(a,b,c,d){var e,f,g,h;return h=c.match(/width="([0-9]*)"/),h=h&&h[1]?h[1]:"",h&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",g=f.match(/align[a-z]+/i)||"alignnone",f=f.replace(/wp-caption ?|align[a-z]+ ?/gi,""),f&&(f=' class="'+f+'"'),d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"
"),'[caption id="'+e+'" align="'+g+'" width="'+h+'"'+f+"]"+c+" "+d+"[/caption]"):c}),0!==c.indexOf("[caption")&&(c=b.replace(/[\s\S]*?((?:
]+>)?]+>(?:<\/a>)?)(

[\s\S]*<\/p>)?[\s\S]*/gi,"

$1

$2")),c)})}function d(b){var c,d,e,f,g,h,i,j,k=[],l=a.dom,m=/^\d+$/;return e={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""},e.url=l.getAttrib(b,"src"),e.alt=l.getAttrib(b,"alt"),e.title=l.getAttrib(b,"title"),i=l.getAttrib(b,"width"),j=l.getAttrib(b,"height"),(!m.test(i)||parseInt(i,10)<1)&&(i=b.naturalWidth||b.width),(!m.test(j)||parseInt(j,10)<1)&&(j=b.naturalHeight||b.height),e.customWidth=e.width=i,e.customHeight=e.height=j,c=tinymce.explode(b.className," "),d=[],tinymce.each(c,function(a){/^wp-image/.test(a)?e.attachment_id=parseInt(a.replace("wp-image-",""),10):/^align/.test(a)?e.align=a.replace("align",""):/^size/.test(a)?e.size=a.replace("size-",""):d.push(a)}),e.extraClasses=d.join(" "),f=l.getParents(b,".wp-caption"),f.length&&(f=f[0],c=f.className.split(" "),tinymce.each(c,function(a){/^align/.test(a)?e.align=a.replace("align",""):a&&"wp-caption"!==a&&k.push(a)}),e.captionClassName=k.join(" "),g=l.select("dd.wp-caption-dd",f),g.length&&(g=g[0],e.caption=a.serializer.serialize(g).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,""))),b.parentNode&&"A"===b.parentNode.nodeName&&(h=b.parentNode,e.linkUrl=l.getAttrib(h,"href"),e.linkTargetBlank="_blank"===l.getAttrib(h,"target")?!0:!1,e.linkRel=l.getAttrib(h,"rel"),e.linkClassName=h.className),e}function e(a){return a&&!(!a.textContent&&!a.innerText)}function f(b,c){var d,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v=a.dom;d=tinymce.explode(c.extraClasses," "),d||(d=[]),c.caption||d.push("align"+c.align),c.attachment_id&&(d.push("wp-image-"+c.attachment_id),c.size&&"custom"!==c.size&&d.push("size-"+c.size)),s=c.width,t=c.height,"custom"===c.size&&(s=c.customWidth,t=c.customHeight),q={src:c.url,width:s||null,height:t||null,alt:c.alt,title:c.title||null,"class":d.join(" ")||null},v.setAttribs(b,q),r={href:c.linkUrl,rel:c.linkRel||null,target:c.linkTargetBlank?"_blank":null,"class":c.linkClassName||null},b.parentNode&&"A"===b.parentNode.nodeName&&!e(b.parentNode)?c.linkUrl?v.setAttribs(b.parentNode,r):v.remove(b.parentNode,!0):c.linkUrl&&((l=v.getParent(b,"a"))&&v.insertAfter(b,l),l=v.create("a",r),b.parentNode.insertBefore(l,b),l.appendChild(b)),m=a.dom.getParent(b,".mceTemp"),g=b.parentNode&&"A"===b.parentNode.nodeName&&!e(b.parentNode)?b.parentNode:b,c.caption?(p=c.attachment_id?"attachment_"+c.attachment_id:null,u="align"+(c.align||"none"),f="wp-caption "+u,c.captionClassName&&(f+=" "+c.captionClassName.replace(/[<>&]+/g,"")),a.getParam("wpeditimage_html5_captions")||(s=parseInt(s,10),s+=10),m?(o=v.select("dl.wp-caption",m),o.length&&v.setAttribs(o,{id:p,"class":f,style:"width: "+s+"px"}),n=v.select(".wp-caption-dd",m),n.length&&v.setHTML(n[0],c.caption)):(p=p?'id="'+p+'" ':"",h="

'+v.getOuterHTML(g)+'
'+c.caption+"
",(j=v.getParent(g,"p"))?(k=v.create("div",{"class":"mceTemp"},h),j.parentNode.insertBefore(k,j),v.remove(g),v.isEmpty(j)&&v.remove(j)):v.setOuterHTML(g,'
'+h+"
"))):m&&(j=v.create("p"),m.parentNode.insertBefore(j,m),j.appendChild(g),v.remove(m)),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:a,metadata:c,image:b}),a.nodeChanged(),i(b)}function g(b){var c,e,g;return"undefined"!=typeof wp&&wp.media?(g=d(b),wp.media.events.trigger("editor:image-edit",{editor:a,metadata:g,image:b}),c=wp.media({frame:"image",state:"image-details",metadata:g}),wp.media.events.trigger("editor:frame-create",{frame:c}),e=function(d){a.focus(),a.undoManager.transact(function(){f(b,d)}),c.detach()},c.state("image-details").on("update",e),c.state("replace-image").on("replace",e),c.on("close",function(){a.focus(),c.detach(),o=!1}),void c.open()):void a.execCommand("mceImage")}function h(b){var c;"DIV"===b.nodeName&&a.dom.hasClass(b,"mceTemp")?c=b:("IMG"===b.nodeName||"DT"===b.nodeName||"A"===b.nodeName)&&(c=a.dom.getParent(b,"div.mceTemp")),c?(a.selection.select(c.nextSibling?c.nextSibling:c.previousSibling?c.previousSibling:c.parentNode),a.selection.collapse(!0),a.dom.remove(c)):a.dom.remove(b),j(),a.nodeChanged(),a.undoManager.add()}function i(b){var c,d,e,f,g=a.dom;j(),b&&"IMG"===b.nodeName&&!k(b)&&(g.setAttrib(b,"data-wp-imgselect",1),c=g.getRect(b),d='',e=g.create("p",{id:"wp-image-toolbar","data-mce-bogus":"all",contenteditable:!1},d),f=a.rtl?c.x+c.w-82:c.x,a.getBody().appendChild(e),g.setStyles(e,{top:c.y,left:f}),n=!0)}function j(){var b=a.dom.get("wp-image-toolbar");b&&a.dom.remove(b),a.dom.setAttrib(a.dom.select("img[data-wp-imgselect]"),"data-wp-imgselect",null),o=!1,n=!1}function k(b){var c=a.dom;return c.hasClass(b,"mceItem")||c.getAttrib(b,"data-mce-placeholder")||c.getAttrib(b,"data-mce-object")?!0:!1}function l(a){return a&&"I"===a.nodeName&&"wp-image-toolbar"===a.parentNode.id}function m(b){var c,d=b.target,e=a.dom;b.button&&b.button>1||(l(d)?(c=e.select("img[data-wp-imgselect]")[0],c&&(a.selection.select(c),e.hasClass(d,"remove")?h(c):e.hasClass(d,"edit")&&(o||(g(c),o=!0))),b.preventDefault()):"IMG"!==d.nodeName||a.dom.getAttrib(d,"data-wp-imgselect")||k(d)?"IMG"!==d.nodeName&&j():i(d))}var n=!1,o=!1;return"ontouchend"in document?(a.on("touchend",m),a.on("click",function(a){var b=a.target;o&&"IMG"===b.nodeName&&a.preventDefault(),l(b)&&(a.preventDefault(),a.stopPropagation())})):a.on("mouseup",m),a.on("init",function(){var b=a.dom,c=a.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";b.addClass(a.getBody(),c),a.on("wpLoadImageForm",function(b){if(!a.getParam("wpeditimage_disable_captions")){var c={type:"textbox",flex:1,name:"caption",minHeight:60,multiline:!0,scroll:!0,label:"Image caption"};b.data.splice(b.data.length-1,0,c)}}),a.on("wpNewImageRefresh",function(a){var c,d;(c=b.getParent(a.node,"dl.wp-caption"))&&(c.style.width||(d=parseInt(a.node.clientWidth,10)+10,d=d?d+"px":"50%",b.setStyle(c,"width",d)))}),a.on("wpImageFormSubmit",function(c){var d,e,f,g,h,i=c.imgData.data,j=c.imgData.node,k=c.imgData.caption,l="",m="",n="";return i.id="__wp-temp-img-id",c.imgData.cancel=!0,i.style||(i.style=null),i.src?(k&&(k=k.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),k=k.replace(/(]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"
")),j?(h=j.id||null,b.setAttribs(j,i),d=b.getParent(j,"dl.wp-caption"),k?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=k):(j.className&&(l=j.className.match(/wp-image-([0-9]+)/),m=j.className.match(/align(left|right|center|none)/)),m?(m=m[0],j.className=j.className.replace(/align(left|right|center|none)/g,"")):m="alignnone",m=' class="wp-caption '+m+'"',l&&(l=' id="attachment_'+l[1]+'"'),n=i.width||j.clientWidth,n&&(n=parseInt(n,10),a.getParam("wpeditimage_html5_captions")||(n+=10),n=' style="width: '+n+'px"'),j.parentNode&&"A"===j.parentNode.nodeName?(g=b.getOuterHTML(j.parentNode),f=j.parentNode):(g=b.getOuterHTML(j),f=j),g="
'+g+'
'+k+"
",(e=b.getParent(j,"p"))?(d=b.create("div",{"class":"mceTemp"},g),b.insertAfter(d,e),a.selection.select(d),a.nodeChanged(),b.remove(f),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('
'+g+"
")):d&&(g=b.getOuterHTML("A"===j.parentNode.nodeName?j.parentNode:j),e=b.create("p",{},g),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(g=b.createHTML("img",i),k?(f=a.selection.getNode(),i.width&&(n=parseInt(i.width,10),a.getParam("wpeditimage_html5_captions")||(n+=10),n=' style="width: '+n+'px"'),g='
'+g+'
'+k+"
",e="P"===f.nodeName?f:b.getParent(f,"p"),e&&"P"===e.nodeName?(d=b.create("div",{"class":"mceTemp"},g),e.parentNode.insertBefore(d,e),a.selection.select(d),a.nodeChanged(),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('
'+g+"
")):a.selection.setContent(g)),j=b.get("__wp-temp-img-id"),b.setAttrib(j,"id",h),void(c.imgData.node=j)):void(j&&(b.remove((d=b.getParent(j,"div.mceTemp"))?d:"A"===j.parentNode.nodeName?j.parentNode:j),a.nodeChanged()))}),a.on("wpLoadImageData",function(c){var d,e=c.imgData.data,f=c.imgData.node;(d=b.getParent(f,"dl.wp-caption"))&&(d=b.select("dd.wp-caption-dd",d)[0],d&&(e.caption=a.serializer.serialize(d).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,"")))}),b.bind(a.getDoc(),"dragstart",function(c){var d=a.selection.getNode();"IMG"===d.nodeName&&b.getParent(d,".wp-caption")&&c.preventDefault(),j()}),tinymce.Env.ie&&tinymce.Env.ie>10&&(b.bind(a.getBody(),"mscontrolselect",function(c){"IMG"===c.target.nodeName&&b.getParent(c.target,".wp-caption")?a.getBody().focus():"DL"===c.target.nodeName&&b.hasClass(c.target,"wp-caption")&&c.target.focus()}),a.on("click",function(c){"IMG"===c.target.nodeName&&b.getAttrib(c.target,"data-wp-imgselect")&&b.getParent(c.target,"dl.wp-caption")&&a.getBody().focus()}))}),a.on("ObjectResized",function(b){var c=b.target;"IMG"===c.nodeName&&a.undoManager.transact(function(){var d,e,f=a.dom;c.className=c.className.replace(/\bsize-[^ ]+/,""),(d=f.getParent(c,".wp-caption"))&&(e=b.width||f.getAttrib(c,"width"),e&&(e=parseInt(e,10),a.getParam("wpeditimage_html5_captions")||(e+=10),f.setStyle(d,"width",e+"px"))),i(c)})}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g=b.command,h=a.dom;"mceInsertContent"===g?(c=h.getParent(a.selection.getNode(),"div.mceTemp"))&&(d=h.create("p"),h.insertAfter(d,c),a.selection.setCursorLocation(d,0),a.nodeChanged()):("JustifyLeft"===g||"JustifyRight"===g||"JustifyCenter"===g)&&(c=a.selection.getNode(),f=g.substr(7).toLowerCase(),f="align"+f,e=h.getParent(c,"dl.wp-caption"),j(),e&&(h.hasClass(e,f)?(h.removeClass(e,f),h.addClass(e,"alignnone")):(e.className=e.className.replace(/align[^ ]+/g,""),h.addClass(e,f)),"IMG"===c.nodeName&&a.nodeChanged(),b.preventDefault()),"IMG"===c.nodeName&&(h.hasClass(c,f)?h.addClass(c,"alignnone"):h.removeClass(c,"alignnone")))}),a.on("keydown",function(b){var c,d,e,f,g=a.selection,i=b.keyCode,k=a.dom;if(i===tinymce.util.VK.ENTER)c=g.getNode(),d=k.getParent(c,"div.mceTemp"),d&&(k.events.cancel(b),tinymce.each(k.select("dt, dd",d),function(a){k.isEmpty(a)&&k.remove(a)}),f=tinymce.Env.ie&&tinymce.Env.ie<11?"":'
',e=k.create("p",null,f),"DD"===c.nodeName?k.insertAfter(e,d):d.parentNode.insertBefore(e,d),a.nodeChanged(),g.setCursorLocation(e,0));else if(i===tinymce.util.VK.DELETE||i===tinymce.util.VK.BACKSPACE){if(c=g.getNode(),"DIV"===c.nodeName&&k.hasClass(c,"mceTemp")?d=c:("IMG"===c.nodeName||"DT"===c.nodeName||"A"===c.nodeName)&&(d=k.getParent(c,"div.mceTemp")),d)return k.events.cancel(b),h(c),!1;j()}if(n){if(b.ctrlKey||b.metaKey||b.altKey||48>i&&i>90||i>186)return;j()}}),a.on("mousedown",function(a){l(a.target)?tinymce.Env.ie&&a.preventDefault():"IMG"!==a.target.nodeName&&j()}),a.on("BeforeAddUndo",function(a){a.level.content=a.level.content.replace(/ data-wp-imgselect="1"/g,"")}),tinymce.Env.gecko&&a.on("undo redo",function(){"IMG"===a.selection.getNode().nodeName&&a.selection.collapse()}),a.on("cut wpview-selected",function(){j()}),a.wpSetImgCaption=function(a){return b(a)},a.wpGetImgCaption=function(a){return c(a)},a.on("BeforeSetContent",function(b){"raw"!==b.format&&(b.content=a.wpSetImgCaption(b.content))}),a.on("PostProcess",function(b){b.get&&(b.content=a.wpGetImgCaption(b.content),b.content=b.content.replace(/ data-wp-imgselect="1"/g,""))}),{_do_shcode:b,_get_shcode:c}}); \ No newline at end of file +tinymce.PluginManager.add("wpeditimage",function(a){function b(b){return b.replace(/(?:

)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(b,c,d){var e,f,g,h,i,j,k=tinymce.trim;return e=c.match(/id=['"]([^'"]*)['"] ?/),e&&(c=c.replace(e[0],"")),f=c.match(/align=['"]([^'"]*)['"] ?/),f&&(c=c.replace(f[0],"")),g=c.match(/class=['"]([^'"]*)['"] ?/),g&&(c=c.replace(g[0],"")),j=c.match(/width=['"]([0-9]*)['"] ?/),j&&(c=c.replace(j[0],"")),d=k(d),i=d.match(/((?:]+>)?]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=k(i[2]),i=k(i[1])):(h=k(c).replace(/caption=['"]/,"").replace(/['"]$/,""),i=d),e=e&&e[1]?e[1].replace(/[<>&]+/g,""):"",f=f&&f[1]?f[1]:"alignnone",g=g&&g[1]?" "+g[1].replace(/[<>&]+/g,""):"",!j&&i&&(j=i.match(/width=['"]([0-9]*)['"]/)),j&&j[1]&&(j=j[1]),j&&h?(j=parseInt(j,10),a.getParam("wpeditimage_html5_captions")||(j+=10),'

"):d})}function c(a){return a.replace(/
]*>([\s\S]+?)<\/div>/g,function(a,b){var c="";return-1===b.indexOf("]+>([\s\S]+?)<\/dd>/i),c&&c[1]?"

"+c[1]+"

":""):(c=b.replace(/
]+)>\s*
]+>([\s\S]+?)<\/dt>\s*
]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi,function(a,b,c,d){var e,f,g,h;return h=c.match(/width="([0-9]*)"/),h=h&&h[1]?h[1]:"",h&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",g=f.match(/align[a-z]+/i)||"alignnone",f=f.replace(/wp-caption ?|align[a-z]+ ?/gi,""),f&&(f=' class="'+f+'"'),d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"
"),'[caption id="'+e+'" align="'+g+'" width="'+h+'"'+f+"]"+c+" "+d+"[/caption]"):c}),0!==c.indexOf("[caption")&&(c=b.replace(/[\s\S]*?((?:
]+>)?]+>(?:<\/a>)?)(

[\s\S]*<\/p>)?[\s\S]*/gi,"

$1

$2")),c)})}function d(b){var c,d,e,f,g,h,i,j,k=[],l=a.dom,m=/^\d+$/;return e={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""},e.url=l.getAttrib(b,"src"),e.alt=l.getAttrib(b,"alt"),e.title=l.getAttrib(b,"title"),i=l.getAttrib(b,"width"),j=l.getAttrib(b,"height"),(!m.test(i)||parseInt(i,10)<1)&&(i=b.naturalWidth||b.width),(!m.test(j)||parseInt(j,10)<1)&&(j=b.naturalHeight||b.height),e.customWidth=e.width=i,e.customHeight=e.height=j,c=tinymce.explode(b.className," "),d=[],tinymce.each(c,function(a){/^wp-image/.test(a)?e.attachment_id=parseInt(a.replace("wp-image-",""),10):/^align/.test(a)?e.align=a.replace("align",""):/^size/.test(a)?e.size=a.replace("size-",""):d.push(a)}),e.extraClasses=d.join(" "),f=l.getParents(b,".wp-caption"),f.length&&(f=f[0],c=f.className.split(" "),tinymce.each(c,function(a){/^align/.test(a)?e.align=a.replace("align",""):a&&"wp-caption"!==a&&k.push(a)}),e.captionClassName=k.join(" "),g=l.select("dd.wp-caption-dd",f),g.length&&(g=g[0],e.caption=a.serializer.serialize(g).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,""))),b.parentNode&&"A"===b.parentNode.nodeName&&(h=b.parentNode,e.linkUrl=l.getAttrib(h,"href"),e.linkTargetBlank="_blank"===l.getAttrib(h,"target")?!0:!1,e.linkRel=l.getAttrib(h,"rel"),e.linkClassName=h.className),e}function e(a){return a&&!(!a.textContent&&!a.innerText)}function f(b,c){var d,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v=a.dom;d=tinymce.explode(c.extraClasses," "),d||(d=[]),c.caption||d.push("align"+c.align),c.attachment_id&&(d.push("wp-image-"+c.attachment_id),c.size&&"custom"!==c.size&&d.push("size-"+c.size)),s=c.width,t=c.height,"custom"===c.size&&(s=c.customWidth,t=c.customHeight),q={src:c.url,width:s||null,height:t||null,alt:c.alt,title:c.title||null,"class":d.join(" ")||null},v.setAttribs(b,q),r={href:c.linkUrl,rel:c.linkRel||null,target:c.linkTargetBlank?"_blank":null,"class":c.linkClassName||null},b.parentNode&&"A"===b.parentNode.nodeName&&!e(b.parentNode)?c.linkUrl?v.setAttribs(b.parentNode,r):v.remove(b.parentNode,!0):c.linkUrl&&((l=v.getParent(b,"a"))&&v.insertAfter(b,l),l=v.create("a",r),b.parentNode.insertBefore(l,b),l.appendChild(b)),m=a.dom.getParent(b,".mceTemp"),g=b.parentNode&&"A"===b.parentNode.nodeName&&!e(b.parentNode)?b.parentNode:b,c.caption?(p=c.attachment_id?"attachment_"+c.attachment_id:null,u="align"+(c.align||"none"),f="wp-caption "+u,c.captionClassName&&(f+=" "+c.captionClassName.replace(/[<>&]+/g,"")),a.getParam("wpeditimage_html5_captions")||(s=parseInt(s,10),s+=10),m?(o=v.select("dl.wp-caption",m),o.length&&v.setAttribs(o,{id:p,"class":f,style:"width: "+s+"px"}),n=v.select(".wp-caption-dd",m),n.length&&v.setHTML(n[0],c.caption)):(p=p?'id="'+p+'" ':"",h="

'+v.getOuterHTML(g)+'
'+c.caption+"
",(j=v.getParent(g,"p"))?(k=v.create("div",{"class":"mceTemp"},h),j.parentNode.insertBefore(k,j),v.remove(g),v.isEmpty(j)&&v.remove(j)):v.setOuterHTML(g,'
'+h+"
"))):m&&(j=v.create("p"),m.parentNode.insertBefore(j,m),j.appendChild(g),v.remove(m)),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:a,metadata:c,image:b}),a.nodeChanged(),i(b)}function g(b){var c,e,g;return"undefined"!=typeof wp&&wp.media?(g=d(b),wp.media.events.trigger("editor:image-edit",{editor:a,metadata:g,image:b}),c=wp.media({frame:"image",state:"image-details",metadata:g}),wp.media.events.trigger("editor:frame-create",{frame:c}),e=function(d){a.focus(),a.undoManager.transact(function(){f(b,d)}),c.detach()},c.state("image-details").on("update",e),c.state("replace-image").on("replace",e),c.on("close",function(){a.focus(),c.detach(),o=!1}),void c.open()):void a.execCommand("mceImage")}function h(b){var c;"DIV"===b.nodeName&&a.dom.hasClass(b,"mceTemp")?c=b:("IMG"===b.nodeName||"DT"===b.nodeName||"A"===b.nodeName)&&(c=a.dom.getParent(b,"div.mceTemp")),c?(a.selection.select(c.nextSibling?c.nextSibling:c.previousSibling?c.previousSibling:c.parentNode),a.selection.collapse(!0),a.dom.remove(c)):a.dom.remove(b),j(),a.nodeChanged(),a.undoManager.add()}function i(b){var c,d,e,f,g=a.dom;j(),b&&"IMG"===b.nodeName&&!k(b)&&(g.setAttrib(b,"data-wp-imgselect",1),c=g.getRect(b),d='',e=g.create("p",{id:"wp-image-toolbar","data-mce-bogus":"all",contenteditable:!1},d),f=a.rtl?c.x+c.w-82:c.x,a.getBody().appendChild(e),g.setStyles(e,{top:c.y,left:f}),n=!0)}function j(){var b=a.dom.get("wp-image-toolbar");b&&a.dom.remove(b),a.dom.setAttrib(a.dom.select("img[data-wp-imgselect]"),"data-wp-imgselect",null),o=!1,n=!1}function k(b){var c=a.dom;return c.hasClass(b,"mceItem")||c.getAttrib(b,"data-mce-placeholder")||c.getAttrib(b,"data-mce-object")?!0:!1}function l(a){return a&&"I"===a.nodeName&&"wp-image-toolbar"===a.parentNode.id}function m(b){var c,d=b.target,e=a.dom;b.button&&b.button>1||(l(d)?(c=e.select("img[data-wp-imgselect]")[0],c&&(a.selection.select(c),e.hasClass(d,"remove")?h(c):e.hasClass(d,"edit")&&(o||(g(c),o=!0))),b.preventDefault()):"IMG"!==d.nodeName||a.dom.getAttrib(d,"data-wp-imgselect")||k(d)?"IMG"!==d.nodeName&&j():i(d))}var n=!1,o=!1;return"ontouchend"in document&&a.on("click",function(a){var b=a.target;o&&"IMG"===b.nodeName&&a.preventDefault(),l(b)&&(a.preventDefault(),a.stopPropagation())}),a.on("mouseup touchend",m),a.on("init",function(){var b=a.dom,c=a.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";b.addClass(a.getBody(),c),a.on("wpLoadImageForm",function(b){if(!a.getParam("wpeditimage_disable_captions")){var c={type:"textbox",flex:1,name:"caption",minHeight:60,multiline:!0,scroll:!0,label:"Image caption"};b.data.splice(b.data.length-1,0,c)}}),a.on("wpNewImageRefresh",function(a){var c,d;(c=b.getParent(a.node,"dl.wp-caption"))&&(c.style.width||(d=parseInt(a.node.clientWidth,10)+10,d=d?d+"px":"50%",b.setStyle(c,"width",d)))}),a.on("wpImageFormSubmit",function(c){var d,e,f,g,h,i=c.imgData.data,j=c.imgData.node,k=c.imgData.caption,l="",m="",n="";return i.id="__wp-temp-img-id",c.imgData.cancel=!0,i.style||(i.style=null),i.src?(k&&(k=k.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),k=k.replace(/(]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"
")),j?(h=j.id||null,b.setAttribs(j,i),d=b.getParent(j,"dl.wp-caption"),k?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=k):(j.className&&(l=j.className.match(/wp-image-([0-9]+)/),m=j.className.match(/align(left|right|center|none)/)),m?(m=m[0],j.className=j.className.replace(/align(left|right|center|none)/g,"")):m="alignnone",m=' class="wp-caption '+m+'"',l&&(l=' id="attachment_'+l[1]+'"'),n=i.width||j.clientWidth,n&&(n=parseInt(n,10),a.getParam("wpeditimage_html5_captions")||(n+=10),n=' style="width: '+n+'px"'),j.parentNode&&"A"===j.parentNode.nodeName?(g=b.getOuterHTML(j.parentNode),f=j.parentNode):(g=b.getOuterHTML(j),f=j),g="
'+g+'
'+k+"
",(e=b.getParent(j,"p"))?(d=b.create("div",{"class":"mceTemp"},g),b.insertAfter(d,e),a.selection.select(d),a.nodeChanged(),b.remove(f),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('
'+g+"
")):d&&(g=b.getOuterHTML("A"===j.parentNode.nodeName?j.parentNode:j),e=b.create("p",{},g),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(g=b.createHTML("img",i),k?(f=a.selection.getNode(),i.width&&(n=parseInt(i.width,10),a.getParam("wpeditimage_html5_captions")||(n+=10),n=' style="width: '+n+'px"'),g='
'+g+'
'+k+"
",e="P"===f.nodeName?f:b.getParent(f,"p"),e&&"P"===e.nodeName?(d=b.create("div",{"class":"mceTemp"},g),e.parentNode.insertBefore(d,e),a.selection.select(d),a.nodeChanged(),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('
'+g+"
")):a.selection.setContent(g)),j=b.get("__wp-temp-img-id"),b.setAttrib(j,"id",h),void(c.imgData.node=j)):void(j&&(b.remove((d=b.getParent(j,"div.mceTemp"))?d:"A"===j.parentNode.nodeName?j.parentNode:j),a.nodeChanged()))}),a.on("wpLoadImageData",function(c){var d,e=c.imgData.data,f=c.imgData.node;(d=b.getParent(f,"dl.wp-caption"))&&(d=b.select("dd.wp-caption-dd",d)[0],d&&(e.caption=a.serializer.serialize(d).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,"")))}),b.bind(a.getDoc(),"dragstart",function(c){var d=a.selection.getNode();"IMG"===d.nodeName&&b.getParent(d,".wp-caption")&&c.preventDefault(),j()}),tinymce.Env.ie&&tinymce.Env.ie>10&&(b.bind(a.getBody(),"mscontrolselect",function(c){"IMG"===c.target.nodeName&&b.getParent(c.target,".wp-caption")?a.getBody().focus():"DL"===c.target.nodeName&&b.hasClass(c.target,"wp-caption")&&c.target.focus()}),a.on("click",function(c){"IMG"===c.target.nodeName&&b.getAttrib(c.target,"data-wp-imgselect")&&b.getParent(c.target,"dl.wp-caption")&&a.getBody().focus()}))}),a.on("ObjectResized",function(b){var c=b.target;"IMG"===c.nodeName&&a.undoManager.transact(function(){var d,e,f=a.dom;c.className=c.className.replace(/\bsize-[^ ]+/,""),(d=f.getParent(c,".wp-caption"))&&(e=b.width||f.getAttrib(c,"width"),e&&(e=parseInt(e,10),a.getParam("wpeditimage_html5_captions")||(e+=10),f.setStyle(d,"width",e+"px"))),i(c)})}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g=b.command,h=a.dom;"mceInsertContent"===g?(c=h.getParent(a.selection.getNode(),"div.mceTemp"))&&(d=h.create("p"),h.insertAfter(d,c),a.selection.setCursorLocation(d,0),a.nodeChanged()):("JustifyLeft"===g||"JustifyRight"===g||"JustifyCenter"===g)&&(c=a.selection.getNode(),f=g.substr(7).toLowerCase(),f="align"+f,e=h.getParent(c,"dl.wp-caption"),j(),e&&(h.hasClass(e,f)?(h.removeClass(e,f),h.addClass(e,"alignnone")):(e.className=e.className.replace(/align[^ ]+/g,""),h.addClass(e,f)),"IMG"===c.nodeName&&a.nodeChanged(),b.preventDefault()),"IMG"===c.nodeName&&(h.hasClass(c,f)?h.addClass(c,"alignnone"):h.removeClass(c,"alignnone")))}),a.on("keydown",function(b){var c,d,e,f,g=a.selection,i=b.keyCode,k=a.dom;if(i===tinymce.util.VK.ENTER)c=g.getNode(),d=k.getParent(c,"div.mceTemp"),d&&(k.events.cancel(b),tinymce.each(k.select("dt, dd",d),function(a){k.isEmpty(a)&&k.remove(a)}),f=tinymce.Env.ie&&tinymce.Env.ie<11?"":'
',e=k.create("p",null,f),"DD"===c.nodeName?k.insertAfter(e,d):d.parentNode.insertBefore(e,d),a.nodeChanged(),g.setCursorLocation(e,0));else if(i===tinymce.util.VK.DELETE||i===tinymce.util.VK.BACKSPACE){if(c=g.getNode(),"DIV"===c.nodeName&&k.hasClass(c,"mceTemp")?d=c:("IMG"===c.nodeName||"DT"===c.nodeName||"A"===c.nodeName)&&(d=k.getParent(c,"div.mceTemp")),d)return k.events.cancel(b),h(c),!1;j()}if(n){if(b.ctrlKey||b.metaKey||b.altKey||48>i&&i>90||i>186)return;j()}}),a.on("mousedown",function(a){l(a.target)?tinymce.Env.ie&&a.preventDefault():"IMG"!==a.target.nodeName&&j()}),a.on("BeforeAddUndo",function(a){a.level.content=a.level.content.replace(/ data-wp-imgselect="1"/g,"")}),tinymce.Env.gecko&&a.on("undo redo",function(){"IMG"===a.selection.getNode().nodeName&&a.selection.collapse()}),a.on("cut wpview-selected",function(){j()}),a.wpSetImgCaption=function(a){return b(a)},a.wpGetImgCaption=function(a){return c(a)},a.on("BeforeSetContent",function(b){"raw"!==b.format&&(b.content=a.wpSetImgCaption(b.content))}),a.on("PostProcess",function(b){b.get&&(b.content=a.wpGetImgCaption(b.content),b.content=b.content.replace(/ data-wp-imgselect="1"/g,""))}),{_do_shcode:b,_get_shcode:c}}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.js b/wp-includes/js/tinymce/plugins/wpview/plugin.js index 34634a2561..dba3fc7c67 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -11,7 +11,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { toRemove = false, firstFocus = true, _noop = function() { return false; }, - isTouchDevice = ( 'ontouchend' in document ), + isios = /iPad|iPod|iPhone/.test( navigator.userAgent ), cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView; function getView( node ) { @@ -141,7 +141,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { dom.bind( selected, 'beforedeactivate focusin focusout', _stop ); // select the hidden div - if ( isTouchDevice ) { + if ( isios ) { editor.selection.select( clipboard ); } else { editor.selection.select( clipboard, true ); @@ -298,8 +298,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { }); editor.on( 'mousedown mouseup click touchend', function( event ) { - var view = getView( event.target ), - type = isTouchDevice ? 'touchend' : 'mousedown'; + var view = getView( event.target ); firstFocus = false; @@ -308,7 +307,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { event.stopImmediatePropagation(); event.preventDefault(); - if ( event.type === type && ! event.metaKey && ! event.ctrlKey ) { + if ( ( event.type === 'touchend' || event.type === 'mousedown' ) && ! event.metaKey && ! event.ctrlKey ) { if ( editor.dom.hasClass( event.target, 'edit' ) ) { wp.mce.views.edit( view ); editor.focus(); @@ -329,7 +328,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { // Unfortunately, it also inhibits the dragging of views to a new location. return false; } else { - if ( event.type === type ) { + if ( event.type === 'touchend' || event.type === 'mousedown' ) { deselect(); } } diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js index e8be2f7b7c..f3fb63f4bf 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(c){return(c=b(c))?window.decodeURIComponent(a.dom.getAttrib(c,"data-wpview-text")||""):""}function e(c,d){return c=b(c),c?(a.dom.setAttrib(c,"data-wpview-text",window.encodeURIComponent(d||"")),!0):!1}function f(a){a.stopPropagation()}function g(b,c){var d=b?"before":"after",e=b?0:1;k(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function h(b,c,d){var e=a.dom,f=e.create("p");s.ie&&s.ie<11||(f.innerHTML='
'),c?b.parentNode.insertBefore(f,b):e.insertAfter(f,b),k(),c&&d===t.ENTER?g(c,b):a.selection.setCursorLocation(f,0),a.nodeChanged()}function i(b){a.undoManager.transact(function(){h(b),a.dom.remove(b)})}function j(b){var c,e=a.dom;b&&b!==m&&(a.getBody().focus(),k(),m=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},d(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",f),e.bind(m,"beforedeactivate focusin focusout",f),y?a.selection.select(c):a.selection.select(c,!0),a.nodeChanged(),a.fire("wpview-selected",b))}function k(){var b,c=a.dom;m&&(b=a.dom.select(".wpview-clipboard",m)[0],c.unbind(b),c.remove(b),c.unbind(m,"beforedeactivate focusin focusout click mouseup",f),c.setAttrib(m,"data-mce-selected",null)),m=null}function l(a){return a.replace(/]+data-wpview-text=\"([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>(?: |\u00a0)*<\/p><\/div>/g,"$1")}var m,n,o,p,q,r,s=tinymce.Env,t=tinymce.util.VK,u=tinymce.dom.TreeWalker,v=!1,w=!0,x=function(){return!1},y="ontouchend"in document;return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.lastLevel&&l(a.level.content)===l(a.lastLevel.content)&&a.preventDefault()}),a.on("BeforeSetContent",function(b){var c;b.content&&(m&&i(m),b.initial||wp.mce.views.unbind(a),c=a.selection.getNode(),(!b.content.match(/^\s*(https?:\/\/[^\s"]+)\s*$/i)||"P"===c.nodeName&&c.parentNode===a.getBody()&&a.dom.isEmpty(c))&&(b.content=wp.mce.views.toViews(b.content)))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,e=c.clientX,f=c.clientY,h=a.getBody(),i=h.getBoundingClientRect(),j=h.firstChild,k=j.getBoundingClientRect(),l=h.lastChild,m=l.getBoundingClientRect();fm.bottom&&(d=b(l))?(g(!1,d),c.preventDefault()):tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return f>=b.top&&f<=b.bottom?void(ei.right&&(g(!1,a),c.preventDefault())):void 0})}),a.on("init",function(){var c=!1,d=a.selection;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new u(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(d){var e=b(d.target),f=y?"touchend":"mousedown";if(w=!1,e){if(d.stopImmediatePropagation(),d.preventDefault(),d.type===f&&!d.metaKey&&!d.ctrlKey){if(a.dom.hasClass(d.target,"edit"))return wp.mce.views.edit(e),a.focus(),!1;if(a.dom.hasClass(d.target,"remove"))return i(e),!1}return"touchend"===d.type&&c?c=!1:j(e),!1}d.type===f&&k(),"touchend"===d.type&&c&&(c=!1)},!0)}),a.on("PreProcess",function(b){tinymce.each(a.dom.select("div[data-wpview-text]",b.node),function(a){a.textContent=a.innerText=" "})}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/

]*?data-wpview-text="([^"]*)"[^>]*>[\s\S]*?<\/div>/g,function(a,b){return b?"

"+window.decodeURIComponent(b)+"

":""}))}),a.on("keydown",function(c){var d,e,f,l,n,p,q,r=c.keyCode,s=a.dom,u=a.selection;if(m){if((c.metaKey||c.ctrlKey)&&r!==t.BACKSPACE&&86!==r||r>=112&&123>=r)return void((c.metaKey||c.ctrlKey)&&88===r&&(v=m));if(e=b(u.getNode()),e!==m)return void k();r===t.LEFT?(g(!0,e),c.preventDefault()):r===t.UP?(e.previousSibling?b(e.previousSibling)?g(!0,e.previousSibling):(k(),u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):r===t.RIGHT?(g(!1,e),c.preventDefault()):r===t.DOWN?(e.nextSibling?b(e.nextSibling)?g(!1,e.nextSibling):(k(),u.setCursorLocation(e.nextSibling,0)):g(!1,e),c.preventDefault()):(r>47||t.SPACEBAR||r===t.ENTER||r===t.DELETE||r===t.BACKSPACE)&&144!==r&&145!==r&&(i(m),(r===t.ENTER||r===t.DELETE||r===t.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||r>=112&&123>=r)return;if(d=u.getNode(),o=d,e=b(d),u.isCollapsed()||(n=u.getRng(),(e=b(n.endContainer))?(p=n.cloneRange(),u.select(e.previousSibling,!0),u.collapse(),q=u.getRng(),p.setEnd(q.endContainer,q.endOffset),u.setRng(p)):(e=b(n.startContainer))&&(p=n.cloneRange(),p.setStart(e.nextSibling,0),u.setRng(p))),!e)return void(c.keyCode===t.BACKSPACE&&(a.dom.isEmpty(d)?(e=b(d.previousSibling))&&(g(!1,e),a.dom.remove(d),c.preventDefault()):(n=u.getRng())&&0===n.startOffset&&0===n.endOffset&&(e=b(d.previousSibling))&&(g(!1,e),c.preventDefault())));if(!(f=s.hasClass(e,"wpview-selection-before"))&&!(l=s.hasClass(e,"wpview-selection-after")))return;l&&r===t.UP||f&&r===t.BACKSPACE?(e.previousSibling?b(e.previousSibling)?g(!1,e.previousSibling):s.isEmpty(e.previousSibling)&&r===t.BACKSPACE?s.remove(e.previousSibling):(u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):!l||r!==t.DOWN&&r!==t.RIGHT?!f||r!==t.UP&&r!==t.LEFT?f&&r===t.DOWN?(e.nextSibling?b(e.nextSibling)?g(!0,e.nextSibling):u.setCursorLocation(e.nextSibling,0):g(!1,e),c.preventDefault()):l&&r===t.LEFT||f&&r===t.RIGHT?(j(e),c.preventDefault()):l&&r===t.BACKSPACE?(i(e),c.preventDefault()):l?h(e):f&&h(e,!0,r):(e.previousSibling&&(b(e.previousSibling)?g(r===t.UP,e.previousSibling):(u.select(e.previousSibling,!0),u.collapse())),c.preventDefault()):(e.nextSibling&&(b(e.nextSibling)?g(r===t.RIGHT,e.nextSibling):u.setCursorLocation(e.nextSibling,0)),c.preventDefault()),r===t.ENTER&&c.preventDefault()}}),a.on("keyup",function(){v&&(i(v),v=!1)}),a.on("focus",function(){var c;q=!0,a.dom.addClass(a.getBody(),"has-focus"),w&&(c=b(a.getBody().firstChild))&&g(!0,c),w=!1}),a.on("blur",function(){q=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var e=a.dom,f=a.dom.select(".wpview-wrap"),h=d.element.className,i=b(d.element),j=o;if(o=!1,clearInterval(n),tinymce.each(f,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),q&&i)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||p||(k(),p++,g(!0,i));else{if(p=0,k(),j===i.previousSibling)return void g(!0,i);if(j===i.nextSibling)return void g(!1,i);e.addClass(i,h),n=setInterval(function(){e.hasClass(i,"wpview-cursor-hide")?e.removeClass(i,"wpview-cursor-hide"):e.addClass(i,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&("wpview-selection-before"===d.className||"wpview-selection-after"===d.className)&&(c=b(d))&&(h(c),r=c)}),a.on("ExecCommand",function(){var b,c;m&&(b=m,k(),j(b)),r&&(c=r.nextSibling,c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),g(!1,r)),r=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),{getViewText:d,setViewText:e,getView:b}):{getViewText:x,setViewText:x,getView:x}}); \ No newline at end of file +tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(c){return(c=b(c))?window.decodeURIComponent(a.dom.getAttrib(c,"data-wpview-text")||""):""}function e(c,d){return c=b(c),c?(a.dom.setAttrib(c,"data-wpview-text",window.encodeURIComponent(d||"")),!0):!1}function f(a){a.stopPropagation()}function g(b,c){var d=b?"before":"after",e=b?0:1;k(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function h(b,c,d){var e=a.dom,f=e.create("p");s.ie&&s.ie<11||(f.innerHTML='
'),c?b.parentNode.insertBefore(f,b):e.insertAfter(f,b),k(),c&&d===t.ENTER?g(c,b):a.selection.setCursorLocation(f,0),a.nodeChanged()}function i(b){a.undoManager.transact(function(){h(b),a.dom.remove(b)})}function j(b){var c,e=a.dom;b&&b!==m&&(a.getBody().focus(),k(),m=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},d(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",f),e.bind(m,"beforedeactivate focusin focusout",f),y?a.selection.select(c):a.selection.select(c,!0),a.nodeChanged(),a.fire("wpview-selected",b))}function k(){var b,c=a.dom;m&&(b=a.dom.select(".wpview-clipboard",m)[0],c.unbind(b),c.remove(b),c.unbind(m,"beforedeactivate focusin focusout click mouseup",f),c.setAttrib(m,"data-mce-selected",null)),m=null}function l(a){return a.replace(/]+data-wpview-text=\"([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>(?: |\u00a0)*<\/p><\/div>/g,"$1")}var m,n,o,p,q,r,s=tinymce.Env,t=tinymce.util.VK,u=tinymce.dom.TreeWalker,v=!1,w=!0,x=function(){return!1},y=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.lastLevel&&l(a.level.content)===l(a.lastLevel.content)&&a.preventDefault()}),a.on("BeforeSetContent",function(b){var c;b.content&&(m&&i(m),b.initial||wp.mce.views.unbind(a),c=a.selection.getNode(),(!b.content.match(/^\s*(https?:\/\/[^\s"]+)\s*$/i)||"P"===c.nodeName&&c.parentNode===a.getBody()&&a.dom.isEmpty(c))&&(b.content=wp.mce.views.toViews(b.content)))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,e=c.clientX,f=c.clientY,h=a.getBody(),i=h.getBoundingClientRect(),j=h.firstChild,k=j.getBoundingClientRect(),l=h.lastChild,m=l.getBoundingClientRect();fm.bottom&&(d=b(l))?(g(!1,d),c.preventDefault()):tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return f>=b.top&&f<=b.bottom?void(ei.right&&(g(!1,a),c.preventDefault())):void 0})}),a.on("init",function(){var c=!1,d=a.selection;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new u(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(d){var e=b(d.target);if(w=!1,e){if(d.stopImmediatePropagation(),d.preventDefault(),!("touchend"!==d.type&&"mousedown"!==d.type||d.metaKey||d.ctrlKey)){if(a.dom.hasClass(d.target,"edit"))return wp.mce.views.edit(e),a.focus(),!1;if(a.dom.hasClass(d.target,"remove"))return i(e),!1}return"touchend"===d.type&&c?c=!1:j(e),!1}("touchend"===d.type||"mousedown"===d.type)&&k(),"touchend"===d.type&&c&&(c=!1)},!0)}),a.on("PreProcess",function(b){tinymce.each(a.dom.select("div[data-wpview-text]",b.node),function(a){a.textContent=a.innerText=" "})}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/
]*?data-wpview-text="([^"]*)"[^>]*>[\s\S]*?<\/div>/g,function(a,b){return b?"

"+window.decodeURIComponent(b)+"

":""}))}),a.on("keydown",function(c){var d,e,f,l,n,p,q,r=c.keyCode,s=a.dom,u=a.selection;if(m){if((c.metaKey||c.ctrlKey)&&r!==t.BACKSPACE&&86!==r||r>=112&&123>=r)return void((c.metaKey||c.ctrlKey)&&88===r&&(v=m));if(e=b(u.getNode()),e!==m)return void k();r===t.LEFT?(g(!0,e),c.preventDefault()):r===t.UP?(e.previousSibling?b(e.previousSibling)?g(!0,e.previousSibling):(k(),u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):r===t.RIGHT?(g(!1,e),c.preventDefault()):r===t.DOWN?(e.nextSibling?b(e.nextSibling)?g(!1,e.nextSibling):(k(),u.setCursorLocation(e.nextSibling,0)):g(!1,e),c.preventDefault()):(r>47||t.SPACEBAR||r===t.ENTER||r===t.DELETE||r===t.BACKSPACE)&&144!==r&&145!==r&&(i(m),(r===t.ENTER||r===t.DELETE||r===t.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||r>=112&&123>=r)return;if(d=u.getNode(),o=d,e=b(d),u.isCollapsed()||(n=u.getRng(),(e=b(n.endContainer))?(p=n.cloneRange(),u.select(e.previousSibling,!0),u.collapse(),q=u.getRng(),p.setEnd(q.endContainer,q.endOffset),u.setRng(p)):(e=b(n.startContainer))&&(p=n.cloneRange(),p.setStart(e.nextSibling,0),u.setRng(p))),!e)return void(c.keyCode===t.BACKSPACE&&(a.dom.isEmpty(d)?(e=b(d.previousSibling))&&(g(!1,e),a.dom.remove(d),c.preventDefault()):(n=u.getRng())&&0===n.startOffset&&0===n.endOffset&&(e=b(d.previousSibling))&&(g(!1,e),c.preventDefault())));if(!(f=s.hasClass(e,"wpview-selection-before"))&&!(l=s.hasClass(e,"wpview-selection-after")))return;l&&r===t.UP||f&&r===t.BACKSPACE?(e.previousSibling?b(e.previousSibling)?g(!1,e.previousSibling):s.isEmpty(e.previousSibling)&&r===t.BACKSPACE?s.remove(e.previousSibling):(u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):!l||r!==t.DOWN&&r!==t.RIGHT?!f||r!==t.UP&&r!==t.LEFT?f&&r===t.DOWN?(e.nextSibling?b(e.nextSibling)?g(!0,e.nextSibling):u.setCursorLocation(e.nextSibling,0):g(!1,e),c.preventDefault()):l&&r===t.LEFT||f&&r===t.RIGHT?(j(e),c.preventDefault()):l&&r===t.BACKSPACE?(i(e),c.preventDefault()):l?h(e):f&&h(e,!0,r):(e.previousSibling&&(b(e.previousSibling)?g(r===t.UP,e.previousSibling):(u.select(e.previousSibling,!0),u.collapse())),c.preventDefault()):(e.nextSibling&&(b(e.nextSibling)?g(r===t.RIGHT,e.nextSibling):u.setCursorLocation(e.nextSibling,0)),c.preventDefault()),r===t.ENTER&&c.preventDefault()}}),a.on("keyup",function(){v&&(i(v),v=!1)}),a.on("focus",function(){var c;q=!0,a.dom.addClass(a.getBody(),"has-focus"),w&&(c=b(a.getBody().firstChild))&&g(!0,c),w=!1}),a.on("blur",function(){q=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var e=a.dom,f=a.dom.select(".wpview-wrap"),h=d.element.className,i=b(d.element),j=o;if(o=!1,clearInterval(n),tinymce.each(f,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),q&&i)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||p||(k(),p++,g(!0,i));else{if(p=0,k(),j===i.previousSibling)return void g(!0,i);if(j===i.nextSibling)return void g(!1,i);e.addClass(i,h),n=setInterval(function(){e.hasClass(i,"wpview-cursor-hide")?e.removeClass(i,"wpview-cursor-hide"):e.addClass(i,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&("wpview-selection-before"===d.className||"wpview-selection-after"===d.className)&&(c=b(d))&&(h(c),r=c)}),a.on("ExecCommand",function(){var b,c;m&&(b=m,k(),j(b)),r&&(c=r.nextSibling,c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),g(!1,r)),r=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),{getViewText:d,setViewText:e,getView:b}):{getViewText:x,setViewText:x,getView:x}}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index fad40bdf4a175bb02ee4d715529aff70a863d951..547a9bee6369dd082a702d383477531f15c5e1fd 100644 GIT binary patch delta 4705 zcmV-n5}xhdmk9Hh2!ON!s`-DVXhWvDUfolOR(bB_%{VElhxwQ>mTJg}>H$EEs?i*E zuh+|#9wrh_w;GAEC^io7OXc?|_RixYozkU*Z%qOKRHJ@WtVVLRe49rJ-JKYC!!lqXo?$eyg;XtlaxCVsoEd+4G1xm6tX7G? z$geE`7k1cEHMcM)1SAr}#mM8)mv$k1jPmcTncuJJ6*cf79T#ait-}PyTp-cBxvlwl ziwbkZu3)5w-W5xAeMj(#wWLBUi!OlSIy^bXhlqYc+)>wieEeUi_hdP`$#1z}28PWtBivxwI1Ge1KsGj%tqoEX+$>E5o=L-uXHD zy8}`M59?8upc6h*e-WoMRLskCq)YjW1B7F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