From 56e487db9b8e81c6dfb90ec100208a05afea384a Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 8 Mar 2017 17:45:06 +0100 Subject: [PATCH] TinyMCE per block: Fix Inline inserter (#213) --- tinymce-per-block/build/app.js | 6 +++--- .../src/blocks/quote-block/_style.scss | 14 +++++--------- tinymce-per-block/src/blocks/text-block/form.js | 11 ++++++----- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/tinymce-per-block/build/app.js b/tinymce-per-block/build/app.js index babff4f95a77f3..a60b2f0acc6e71 100644 --- a/tinymce-per-block/build/app.js +++ b/tinymce-per-block/build/app.js @@ -30,6 +30,6 @@ l(t,n)):"topBlur"===e&&p()}function v(e,t){if(("topSelectionChange"===e||"topKey case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(d,this);break;case"input":P.mountWrapper(this,i,n),i=P.getHostProps(this,i),e.getReactMountReady().enqueue(d,this);break;case"option":I.mountWrapper(this,i,n),i=I.getHostProps(this,i);break;case"select":M.mountWrapper(this,i,n),i=M.getHostProps(this,i),e.getReactMountReady().enqueue(d,this);break;case"textarea":A.mountWrapper(this,i,n),i=A.getHostProps(this,i),e.getReactMountReady().enqueue(d,this)}a(this,i);var u,c;if(null!=n?(u=n._namespaceURI,c=n._tag):o._tag&&(u=o._namespaceURI,c=o._tag),(null==u||u===C.svg&&"foreignobject"===c)&&(u=C.html),u===C.html&&("svg"===this._tag?u=C.svg:"math"===this._tag&&(u=C.mathml)),this._namespaceURI=u,"production"!==t.env.NODE_ENV){var f;null!=n?f=n._ancestorInfo:o._tag&&(f=o._ancestorInfo),f&&H(this._tag,null,this,f),this._ancestorInfo=H.updatedAncestorInfo(f,this._tag,this)}var h;if(e.useCreateElement){var v,m=o._ownerDocument;if(u===C.html)if("script"===this._tag){var y=m.createElement("div"),g=this._currentElement.type;y.innerHTML="<"+g+">",v=y.removeChild(y.firstChild)}else v=i.is?m.createElement(this._currentElement.type,i.is):m.createElement(this._currentElement.type);else v=m.createElementNS(u,this._currentElement.type);T.precacheNode(this,v),this._flags|=q.hasCachedChildNodes,this._hostParent||x.setAttributeForRoot(v),this._updateDOMProperties(null,i,e);var b=N(v);this._createInitialChildren(e,i,r,b),h=b}else{var E=this._createOpenTagMarkupAndPutListeners(e,i),w=this._createContentMarkup(e,i,r);h=!w&&re[this._tag]?E+"/>":E+">"+w+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(_.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(l,this),i.autoFocus&&e.getReactMountReady().enqueue(_.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(_.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(_.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(p,this)}return h},_createOpenTagMarkupAndPutListeners:function(e,n){var o="<"+this._currentElement.type;for(var r in n)if(n.hasOwnProperty(r)){var i=n[r];if(null!=i)if(G.hasOwnProperty(r))i&&u(this,r,i,e);else{r===Q&&(i&&("production"!==t.env.NODE_ENV&&(this._previousStyle=i),i=this._previousStyleCopy=b({},n.style)),i=E.createMarkupForStyles(i,this));var a=null;null!=this._tag&&v(this._tag,n)?Z.hasOwnProperty(r)||(a=x.createMarkupForCustomAttribute(r,i)):a=x.createMarkupForProperty(r,i),a&&(o+=" "+a)}}return e.renderToStaticMarkup?o:(this._hostParent||(o+=" "+x.createMarkupForRoot()),o+=" "+x.createMarkupForID(this._domID))},_createContentMarkup:function(e,n,o){var r="",i=n.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var a=X[y(n.children)]?n.children:null,u=null!=a?null:n.children;if(null!=a)r=L(a),"production"!==t.env.NODE_ENV&&ne.call(this,a);else if(null!=u){var c=this.mountChildren(u,e,o);r=c.join("")}}return ie[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,n,o,r){var i=n.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&N.queueHTML(r,i.__html);else{var a=X[y(n.children)]?n.children:null,u=null!=a?null:n.children;if(null!=a)""!==a&&("production"!==t.env.NODE_ENV&&ne.call(this,a),N.queueText(r,a));else if(null!=u)for(var c=this.mountChildren(u,e,o),s=0;s tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg , , and ) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this._tag):g("66",this._tag)}this.unmountChildren(e),T.uncacheNode(this),k.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null,"production"!==t.env.NODE_ENV&&ne.call(this,null)},getPublicInstance:function(){return K(this)}},b(m.prototype,m.Mixin,j.Mixin),e.exports=m}).call(t,n(0))},function(e,t,n){"use strict";(function(t){function o(e,n){var o={_topLevelWrapper:e,_idCounter:1,_ownerDocument:n?n.nodeType===i?n:n.ownerDocument:null,_node:n,_tag:n?n.nodeName.toLowerCase():null,_namespaceURI:n?n.namespaceURI:null};return"production"!==t.env.NODE_ENV&&(o._ancestorInfo=n?r.updatedAncestorInfo(null,o._tag,null):null),o}var r=n(92),i=9;e.exports=o}).call(t,n(0))},function(e,t,n){"use strict";var o=n(5),r=n(32),i=n(6),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(a.prototype,{mountComponent:function(e,t,n,o){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(e.useCreateElement){var c=n._ownerDocument,s=c.createComment(u);return i.precacheNode(this,s),r(s)}return e.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";var o={useCreateElement:!0,useFiber:!1};e.exports=o},function(e,t,n){"use strict";var o=n(78),r=n(6),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=r.getNodeFromInstance(e);o.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";(function(t){function o(){this._rootNodeID&&_.updateWrapper(this)}function r(e){var t="checkbox"===e.type||"radio"===e.type;return t?null!=e.checked:null!=e.value}function i(e){var n=this._currentElement.props,r=s.executeOnChange(n,e);p.asap(o,this);var i=n.name;if("radio"===n.type&&null!=i){for(var u=l.getNodeFromInstance(this),c=u;c.parentNode;)c=c.parentNode;for(var f=c.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),h=0;h tag. For details, see https://fb.me/invalid-aria-prop%s",s,n.type,u.getStackAddendumByID(e)):void 0:r.length>1&&("production"!==t.env.NODE_ENV?c(!1,"Invalid aria props %s on <%s> tag. For details, see https://fb.me/invalid-aria-prop%s",s,n.type,u.getStackAddendumByID(e)):void 0)}function i(e,t){null!=t&&"string"==typeof t.type&&(t.type.indexOf("-")>=0||t.props.is||r(e,t))}var a=n(21),u=n(10),c=n(3),s={},l=new RegExp("^(aria)-["+a.ATTRIBUTE_NAME_CHAR+"]*$"),p={onBeforeMountComponent:function(e,n){"production"!==t.env.NODE_ENV&&i(e,n)},onBeforeUpdateComponent:function(e,n){"production"!==t.env.NODE_ENV&&i(e,n)}};e.exports=p}).call(t,n(0))},function(e,t,n){"use strict";(function(t){function o(e,n){null!=n&&("input"!==n.type&&"textarea"!==n.type&&"select"!==n.type||null==n.props||null!==n.props.value||a||("production"!==t.env.NODE_ENV?i(!1,"`value` prop on `%s` should not be null. Consider using the empty string to clear the component or `undefined` for uncontrolled components.%s",n.type,r.getStackAddendumByID(e)):void 0,a=!0))}var r=n(10),i=n(3),a=!1,u={onBeforeMountComponent:function(e,t){o(e,t)},onBeforeUpdateComponent:function(e,t){o(e,t)}};e.exports=u}).call(t,n(0))},function(e,t,n){"use strict";(function(t){function o(e){var n="";return i.Children.forEach(e,function(e){null!=e&&("string"==typeof e||"number"==typeof e?n+=e:s||(s=!0,"production"!==t.env.NODE_ENV?c(!1,"Only strings and numbers are supported as