@tinymce/tinymce-vue 4.0.7 → 5.0.0-feature.20220320083130677.shabb430f4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt CHANGED
@@ -1,13 +1,21 @@
1
- Copyright 2017-present Tiny Technologies, Inc.
1
+ MIT License
2
2
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
3
+ Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
6
4
 
7
- http://www.apache.org/licenses/LICENSE-2.0
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
8
11
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -320,7 +320,7 @@ var Editor = (function (vue) {
320
320
  initWrapper();
321
321
  }
322
322
  else if (element.value && element.value.ownerDocument) {
323
- var channel = props.cloudChannel ? props.cloudChannel : '5';
323
+ var channel = props.cloudChannel ? props.cloudChannel : '6';
324
324
  var apiKey = props.apiKey ? props.apiKey : 'no-api-key';
325
325
  var scriptSrc = isNullOrUndefined(props.tinymceScriptSrc) ?
326
326
  "https://cdn.tiny.cloud/1/" + apiKey + "/tinymce/" + channel + "/tinymce.min.js" :
@@ -1 +1 @@
1
- var Editor=function(a){"use strict";function n(n){return-1!==t.map(function(n){return n.toLowerCase()}).indexOf(n.toLowerCase())}function e(){return{listeners:[],scriptId:h("tiny-script"),scriptLoaded:!1}}function g(){var n="undefined"!=typeof window?window:global;return n&&n.tinymce?n.tinymce:null}var o,y=function(){return(y=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)},t=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],C=function(t,o,i){Object.keys(o).filter(n).forEach(function(n){var e=o[n];"function"==typeof e&&("onInit"===n?e(t,i):i.on(n.substring(2),function(n){return e(n,i)}))})},S=function(t,n,o,e){var i=t.modelEvents||null,i=Array.isArray(i)?i.join(" "):i;a.watch(e,function(n,e){o&&"string"==typeof n&&n!==e&&n!==o.getContent({format:t.outputFormat})&&o.setContent(n)}),o.on(i||"change input undo redo",function(){n.emit("update:modelValue",o.getContent({format:t.outputFormat}))})},i=0,h=function(n){var e=Date.now();return n+"_"+Math.floor(1e9*Math.random())+ ++i+String(e)},b=function(n){return void 0===n||""===n?[]:Array.isArray(n)?n:n.split(" ")},w=(o=e(),{load:function(n,e,t){o.scriptLoaded?t():(o.listeners.push(t),n.getElementById(o.scriptId)||function(n,e,t,o){var i=e.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=n,i.src=t;function r(){i.removeEventListener("load",r),o()}i.addEventListener("load",r),e.head&&e.head.appendChild(i)}(o.scriptId,n,e,function(){o.listeners.forEach(function(n){return n()}),o.scriptLoaded=!0}))},reinitialize:function(){o=e()}}),r={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(n){return"html"===n||"text"===n}}};return a.defineComponent({props:r,setup:function(u,l){function t(){var n,e,a=(n=p,f?function(){return null!=c&&c.value?c.value:""}:function(){return n?v:m}),t=y(y({},o),{readonly:u.disabled,selector:"#"+r,plugins:(t=o.plugins,e=u.plugins,b(t).concat(b(e))),toolbar:u.toolbar||o.toolbar,inline:s,setup:function(r){(d=r).on("init",function(n){return e=n,t=u,o=l,i=c,(n=r).setContent(a()),o.attrs["onUpdate:modelValue"]&&S(t,o,n,i),void C(e,o.attrs,n);var e,t,o,i}),"function"==typeof o.setup&&o.setup(r)}});null!==(e=i.value)&&"textarea"===e.tagName.toLowerCase()&&(i.value.style.visibility=""),g().init(t),p=!1}var o=u.init?y({},u.init):{},n=a.toRefs(u),e=n.disabled,c=n.modelValue,n=n.tagName,i=a.ref(null),d=null,r=u.id||h("tiny-vue"),s=u.init&&u.init.inline||u.inline,f=!!l.attrs["onUpdate:modelValue"],p=!0,v=u.initialValue||"",m="";a.watch(e,function(n){var e;null!==d&&("function"==typeof(null===(e=d.mode)||void 0===e?void 0:e.set)?d.mode.set(n?"readonly":"design"):d.setMode(n?"readonly":"design"))}),a.watch(n,function(n){var e;f||(m=d.getContent()),null!==(e=g())&&void 0!==e&&e.remove(d),a.nextTick(t)}),a.onMounted(function(){var n,e;null!==g()?t():i.value&&i.value.ownerDocument&&(e=u.cloudChannel||"5",n=u.apiKey||"no-api-key",e=null==u.tinymceScriptSrc?"https://cdn.tiny.cloud/1/"+n+"/tinymce/"+e+"/tinymce.min.js":u.tinymceScriptSrc,w.load(i.value.ownerDocument,e,t))}),a.onBeforeUnmount(function(){null!==g()&&g().remove(d)}),s||(a.onActivated(function(){p||t()}),a.onDeactivated(function(){var n;f||(m=d.getContent()),null!==(n=g())&&void 0!==n&&n.remove(d)}));return l.expose({rerender:function(n){var e;m=d.getContent(),null!==(e=g())&&void 0!==e&&e.remove(d),o=y(y({},o),n),a.nextTick(t)}}),function(){return s?(n=a.h,e=i,t=u.tagName,n(t||"div",{id:r,ref:e})):(0,a.h)("textarea",{id:r,visibility:"hidden",ref:i});var n,e,t}}})}(Vue);
1
+ var Editor=function(a){"use strict";function n(n){return-1!==t.map(function(n){return n.toLowerCase()}).indexOf(n.toLowerCase())}function e(){return{listeners:[],scriptId:h("tiny-script"),scriptLoaded:!1}}function g(){var n="undefined"!=typeof window?window:global;return n&&n.tinymce?n.tinymce:null}var o,y=function(){return(y=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}).apply(this,arguments)},t=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],C=function(t,o,i){Object.keys(o).filter(n).forEach(function(n){var e=o[n];"function"==typeof e&&("onInit"===n?e(t,i):i.on(n.substring(2),function(n){return e(n,i)}))})},S=function(t,n,o,e){var i=t.modelEvents||null,i=Array.isArray(i)?i.join(" "):i;a.watch(e,function(n,e){o&&"string"==typeof n&&n!==e&&n!==o.getContent({format:t.outputFormat})&&o.setContent(n)}),o.on(i||"change input undo redo",function(){n.emit("update:modelValue",o.getContent({format:t.outputFormat}))})},i=0,h=function(n){var e=Date.now();return n+"_"+Math.floor(1e9*Math.random())+ ++i+String(e)},b=function(n){return void 0===n||""===n?[]:Array.isArray(n)?n:n.split(" ")},w=(o=e(),{load:function(n,e,t){o.scriptLoaded?t():(o.listeners.push(t),n.getElementById(o.scriptId)||function(n,e,t,o){var i=e.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=n,i.src=t;function r(){i.removeEventListener("load",r),o()}i.addEventListener("load",r),e.head&&e.head.appendChild(i)}(o.scriptId,n,e,function(){o.listeners.forEach(function(n){return n()}),o.scriptLoaded=!0}))},reinitialize:function(){o=e()}}),r={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(n){return"html"===n||"text"===n}}};return a.defineComponent({props:r,setup:function(u,l){function t(){var n,e,a=(n=p,f?function(){return null!=c&&c.value?c.value:""}:function(){return n?v:m}),t=y(y({},o),{readonly:u.disabled,selector:"#"+r,plugins:(t=o.plugins,e=u.plugins,b(t).concat(b(e))),toolbar:u.toolbar||o.toolbar,inline:s,setup:function(r){(d=r).on("init",function(n){return e=n,t=u,o=l,i=c,(n=r).setContent(a()),o.attrs["onUpdate:modelValue"]&&S(t,o,n,i),void C(e,o.attrs,n);var e,t,o,i}),"function"==typeof o.setup&&o.setup(r)}});null!==(e=i.value)&&"textarea"===e.tagName.toLowerCase()&&(i.value.style.visibility=""),g().init(t),p=!1}var o=u.init?y({},u.init):{},n=a.toRefs(u),e=n.disabled,c=n.modelValue,n=n.tagName,i=a.ref(null),d=null,r=u.id||h("tiny-vue"),s=u.init&&u.init.inline||u.inline,f=!!l.attrs["onUpdate:modelValue"],p=!0,v=u.initialValue||"",m="";a.watch(e,function(n){var e;null!==d&&("function"==typeof(null===(e=d.mode)||void 0===e?void 0:e.set)?d.mode.set(n?"readonly":"design"):d.setMode(n?"readonly":"design"))}),a.watch(n,function(n){var e;f||(m=d.getContent()),null!==(e=g())&&void 0!==e&&e.remove(d),a.nextTick(t)}),a.onMounted(function(){var n,e;null!==g()?t():i.value&&i.value.ownerDocument&&(e=u.cloudChannel||"6",n=u.apiKey||"no-api-key",e=null==u.tinymceScriptSrc?"https://cdn.tiny.cloud/1/"+n+"/tinymce/"+e+"/tinymce.min.js":u.tinymceScriptSrc,w.load(i.value.ownerDocument,e,t))}),a.onBeforeUnmount(function(){null!==g()&&g().remove(d)}),s||(a.onActivated(function(){p||t()}),a.onDeactivated(function(){var n;f||(m=d.getContent()),null!==(n=g())&&void 0!==n&&n.remove(d)}));return l.expose({rerender:function(n){var e;m=d.getContent(),null!==(e=g())&&void 0!==e&&e.remove(d),o=y(y({},o),n),a.nextTick(t)}}),function(){return s?(n=a.h,e=i,t=u.tagName,n(t||"div",{id:r,ref:e})):(0,a.h)("textarea",{id:r,visibility:"hidden",ref:i});var n,e,t}}})}(Vue);
@@ -92,7 +92,7 @@ exports.Editor = vue_1.defineComponent({
92
92
  initWrapper();
93
93
  }
94
94
  else if (element.value && element.value.ownerDocument) {
95
- var channel = props.cloudChannel ? props.cloudChannel : '5';
95
+ var channel = props.cloudChannel ? props.cloudChannel : '6';
96
96
  var apiKey = props.apiKey ? props.apiKey : 'no-api-key';
97
97
  var scriptSrc = Utils_1.isNullOrUndefined(props.tinymceScriptSrc) ?
98
98
  "https://cdn.tiny.cloud/1/" + apiKey + "/tinymce/" + channel + "/tinymce.min.js" :
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { RawEditorSettings } from 'tinymce';
8
+ import { RawEditorOptions } from 'tinymce';
9
9
  export declare type CopyProps<T> = {
10
10
  [P in keyof T]: any;
11
11
  };
@@ -13,7 +13,7 @@ export interface IPropTypes {
13
13
  apiKey: string;
14
14
  cloudChannel: string;
15
15
  id: string;
16
- init: RawEditorSettings;
16
+ init: RawEditorOptions;
17
17
  initialValue: string;
18
18
  outputFormat: 'html' | 'text';
19
19
  inline: boolean;
@@ -89,7 +89,7 @@ export var Editor = defineComponent({
89
89
  initWrapper();
90
90
  }
91
91
  else if (element.value && element.value.ownerDocument) {
92
- var channel = props.cloudChannel ? props.cloudChannel : '5';
92
+ var channel = props.cloudChannel ? props.cloudChannel : '6';
93
93
  var apiKey = props.apiKey ? props.apiKey : 'no-api-key';
94
94
  var scriptSrc = isNullOrUndefined(props.tinymceScriptSrc) ?
95
95
  "https://cdn.tiny.cloud/1/" + apiKey + "/tinymce/" + channel + "/tinymce.min.js" :
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { RawEditorSettings } from 'tinymce';
8
+ import { RawEditorOptions } from 'tinymce';
9
9
  export declare type CopyProps<T> = {
10
10
  [P in keyof T]: any;
11
11
  };
@@ -13,7 +13,7 @@ export interface IPropTypes {
13
13
  apiKey: string;
14
14
  cloudChannel: string;
15
15
  id: string;
16
- init: RawEditorSettings;
16
+ init: RawEditorOptions;
17
17
  initialValue: string;
18
18
  outputFormat: 'html' | 'text';
19
19
  inline: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinymce/tinymce-vue",
3
- "version": "4.0.7",
3
+ "version": "5.0.0-feature.20220320083130677.shabb430f4",
4
4
  "description": "Official TinyMCE Vue 3 Component",
5
5
  "private": false,
6
6
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "component"
25
25
  ],
26
26
  "author": "Ephox Inc",
27
- "license": "Apache-2.0",
27
+ "license": "MIT",
28
28
  "files": [
29
29
  "lib/*/**",
30
30
  "README.md",
@@ -68,6 +68,7 @@
68
68
  "rollup-plugin-uglify": "^6.0.0",
69
69
  "tinymce-4": "npm:tinymce@^4",
70
70
  "tinymce-5": "npm:tinymce@^5",
71
+ "tinymce-6": "npm:tinymce@^6",
71
72
  "ts-loader": "^9.2.6",
72
73
  "ts-node": "^10.2.1",
73
74
  "tsconfig-paths-webpack-plugin": "^3.5.2",
@@ -81,6 +82,6 @@
81
82
  "webpack": "^5.51.1"
82
83
  },
83
84
  "dependencies": {
84
- "tinymce": "^5.5.0"
85
+ "tinymce": "^6.0.0 || ^5.5.1"
85
86
  }
86
87
  }