@tinymce/tinymce-vue 4.0.4 → 4.0.5-feature.20211117013517127.sha4692fc8
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/CHANGELOG.md +2 -0
- package/lib/browser/tinymce-vue.js +0 -7
- package/lib/browser/tinymce-vue.min.js +1 -1
- package/lib/cjs/main/ts/Utils.d.ts +4 -3
- package/lib/cjs/main/ts/components/Editor.d.ts +16 -1
- package/lib/cjs/main/ts/components/EditorPropTypes.d.ts +2 -1
- package/lib/cjs/main/ts/components/EditorPropTypes.js +0 -7
- package/lib/es2015/main/ts/Utils.d.ts +4 -3
- package/lib/es2015/main/ts/components/Editor.d.ts +16 -1
- package/lib/es2015/main/ts/components/EditorPropTypes.d.ts +2 -1
- package/lib/es2015/main/ts/components/EditorPropTypes.js +0 -7
- package/package.json +21 -17
package/CHANGELOG.md
CHANGED
|
@@ -225,13 +225,6 @@ var Editor = (function (vue) {
|
|
|
225
225
|
return global && global.tinymce ? global.tinymce : null;
|
|
226
226
|
};
|
|
227
227
|
|
|
228
|
-
/**
|
|
229
|
-
* Copyright (c) 2018-present, Ephox, Inc.
|
|
230
|
-
*
|
|
231
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
232
|
-
* LICENSE file in the root directory of this source tree.
|
|
233
|
-
*
|
|
234
|
-
*/
|
|
235
228
|
var editorProps = {
|
|
236
229
|
apiKey: String,
|
|
237
230
|
cloudChannel: String,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Editor=function(
|
|
1
|
+
var Editor=function(a){"use strict";function n(n){return-1!==e.map(function(n){return n.toLowerCase()}).indexOf(n.toLowerCase())}function t(){return{listeners:[],scriptId:S("tiny-script"),scriptLoaded:!1}}function m(){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 t,e=1,o=arguments.length;e<o;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}).apply(this,arguments)},e=["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"],g=function(e,o,i){Object.keys(o).filter(n).forEach(function(n){var t=o[n];"function"==typeof t&&("onInit"===n?t(e,i):i.on(n.substring(2),function(n){return t(n,i)}))})},C=function(e,n,o,t){var i=e.modelEvents||null,i=Array.isArray(i)?i.join(" "):i;a.watch(t,function(n,t){o&&"string"==typeof n&&n!==t&&n!==o.getContent({format:e.outputFormat})&&o.setContent(n)}),o.on(i||"change input undo redo",function(){n.emit("update:modelValue",o.getContent({format:e.outputFormat}))})},i=0,S=function(n){var t=Date.now();return n+"_"+Math.floor(1e9*Math.random())+ ++i+String(t)},h=function(n){return void 0===n||""===n?[]:Array.isArray(n)?n:n.split(" ")},b=(o=t(),{load:function(n,t,e){o.scriptLoaded?e():(o.listeners.push(e),n.getElementById(o.scriptId)||function(n,t,e,o){var i=t.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=n,i.src=e;function r(){i.removeEventListener("load",r),o()}i.addEventListener("load",r),t.head&&t.head.appendChild(i)}(o.scriptId,n,t,function(){o.listeners.forEach(function(n){return n()}),o.scriptLoaded=!0}))},reinitialize:function(){o=t()}}),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 e(){var n,t,a=(n=f,d?function(){return null!=c&&c.value?c.value:""}:function(){return n?p:v}),e=y(y({},u.init),{readonly:u.disabled,selector:"#"+r,plugins:(e=u.init&&u.init.plugins,t=u.plugins,h(e).concat(h(t))),toolbar:u.toolbar||u.init&&u.init.toolbar,inline:s,setup:function(r){(i=r).on("init",function(n){return t=n,e=u,o=l,i=c,(n=r).setContent(a()),o.attrs["onUpdate:modelValue"]&&C(e,o,n,i),void g(t,o.attrs,n);var t,e,o,i}),u.init&&"function"==typeof u.init.setup&&u.init.setup(r)}});null!==(t=o.value)&&"textarea"===t.tagName.toLowerCase()&&(o.value.style.visibility=""),m().init(e),f=!1}var n=a.toRefs(u),t=n.disabled,c=n.modelValue,o=a.ref(null),i=null,r=u.id||S("tiny-vue"),s=u.init&&u.init.inline||u.inline,d=!!l.attrs["onUpdate:modelValue"],f=!0,p=u.initialValue||"",v="";return a.watch(t,function(n){null!==i&&i.setMode(n?"readonly":"design")}),a.onMounted(function(){var n,t;null!==m()?e():o.value&&o.value.ownerDocument&&(t=u.cloudChannel||"5",n=u.apiKey||"no-api-key",t=null==u.tinymceScriptSrc?"https://cdn.tiny.cloud/1/"+n+"/tinymce/"+t+"/tinymce.min.js":u.tinymceScriptSrc,b.load(o.value.ownerDocument,t,e))}),a.onBeforeUnmount(function(){null!==m()&&m().remove(i)}),s||(a.onActivated(function(){f||e()}),a.onDeactivated(function(){var n;d||(v=i.getContent()),null!==(n=m())&&void 0!==n&&n.remove(i)})),function(){return s?(n=a.h,t=o,e=u.tagName,n(e||"div",{id:r,ref:t})):(0,a.h)("textarea",{id:r,visibility:"hidden",ref:o});var n,t,e}}})}(Vue);
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Ref, SetupContext } from 'vue';
|
|
9
9
|
import { IPropTypes } from './components/EditorPropTypes';
|
|
10
|
+
import { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
|
|
10
11
|
declare const isValidKey: (key: string) => boolean;
|
|
11
|
-
declare const bindHandlers: (initEvent:
|
|
12
|
-
declare const bindModelHandlers: (props: IPropTypes, ctx: SetupContext, editor:
|
|
13
|
-
declare const initEditor: (initEvent:
|
|
12
|
+
declare const bindHandlers: (initEvent: EditorEvent<any>, listeners: any, editor: TinyMCEEditor) => void;
|
|
13
|
+
declare const bindModelHandlers: (props: IPropTypes, ctx: SetupContext, editor: TinyMCEEditor, modelValue: Ref<any>) => void;
|
|
14
|
+
declare const initEditor: (initEvent: EditorEvent<any>, props: IPropTypes, ctx: SetupContext, editor: TinyMCEEditor, modelValue: Ref<any>, content: () => string) => void;
|
|
14
15
|
declare const uuid: (prefix: string) => string;
|
|
15
16
|
declare const isTextarea: (element: Element | null) => element is HTMLTextAreaElement;
|
|
16
17
|
declare const mergePlugins: (initPlugins: string | string[], inputPlugins?: string | string[] | undefined) => string[];
|
|
@@ -6,6 +6,21 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
export declare const Editor: import("vue").DefineComponent<import("./EditorPropTypes").CopyProps<import("./EditorPropTypes").IPropTypes>, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
9
|
+
apiKey?: unknown;
|
|
10
|
+
cloudChannel?: unknown;
|
|
11
|
+
id?: unknown;
|
|
12
|
+
init?: unknown;
|
|
13
|
+
initialValue?: unknown;
|
|
14
|
+
outputFormat?: unknown;
|
|
15
|
+
inline?: unknown;
|
|
16
|
+
modelEvents?: unknown;
|
|
17
|
+
plugins?: unknown;
|
|
18
|
+
tagName?: unknown;
|
|
19
|
+
toolbar?: unknown;
|
|
20
|
+
modelValue?: unknown;
|
|
21
|
+
disabled?: unknown;
|
|
22
|
+
tinymceScriptSrc?: unknown;
|
|
23
|
+
} & {
|
|
9
24
|
apiKey: any;
|
|
10
25
|
cloudChannel: any;
|
|
11
26
|
id: any;
|
|
@@ -20,7 +35,7 @@ export declare const Editor: import("vue").DefineComponent<import("./EditorPropT
|
|
|
20
35
|
modelValue: any;
|
|
21
36
|
disabled: any;
|
|
22
37
|
tinymceScriptSrc: any;
|
|
23
|
-
} & {}
|
|
38
|
+
} & {}> & {}, {
|
|
24
39
|
apiKey: any;
|
|
25
40
|
cloudChannel: any;
|
|
26
41
|
id: any;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
import { RawEditorSettings } from 'tinymce';
|
|
8
9
|
export declare type CopyProps<T> = {
|
|
9
10
|
[P in keyof T]: any;
|
|
10
11
|
};
|
|
@@ -12,7 +13,7 @@ export interface IPropTypes {
|
|
|
12
13
|
apiKey: string;
|
|
13
14
|
cloudChannel: string;
|
|
14
15
|
id: string;
|
|
15
|
-
init:
|
|
16
|
+
init: RawEditorSettings;
|
|
16
17
|
initialValue: string;
|
|
17
18
|
outputFormat: 'html' | 'text';
|
|
18
19
|
inline: boolean;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2018-present, Ephox, Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
3
|
exports.editorProps = void 0;
|
|
11
4
|
exports.editorProps = {
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Ref, SetupContext } from 'vue';
|
|
9
9
|
import { IPropTypes } from './components/EditorPropTypes';
|
|
10
|
+
import { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
|
|
10
11
|
declare const isValidKey: (key: string) => boolean;
|
|
11
|
-
declare const bindHandlers: (initEvent:
|
|
12
|
-
declare const bindModelHandlers: (props: IPropTypes, ctx: SetupContext, editor:
|
|
13
|
-
declare const initEditor: (initEvent:
|
|
12
|
+
declare const bindHandlers: (initEvent: EditorEvent<any>, listeners: any, editor: TinyMCEEditor) => void;
|
|
13
|
+
declare const bindModelHandlers: (props: IPropTypes, ctx: SetupContext, editor: TinyMCEEditor, modelValue: Ref<any>) => void;
|
|
14
|
+
declare const initEditor: (initEvent: EditorEvent<any>, props: IPropTypes, ctx: SetupContext, editor: TinyMCEEditor, modelValue: Ref<any>, content: () => string) => void;
|
|
14
15
|
declare const uuid: (prefix: string) => string;
|
|
15
16
|
declare const isTextarea: (element: Element | null) => element is HTMLTextAreaElement;
|
|
16
17
|
declare const mergePlugins: (initPlugins: string | string[], inputPlugins?: string | string[] | undefined) => string[];
|
|
@@ -6,6 +6,21 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
export declare const Editor: import("vue").DefineComponent<import("./EditorPropTypes").CopyProps<import("./EditorPropTypes").IPropTypes>, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
9
|
+
apiKey?: unknown;
|
|
10
|
+
cloudChannel?: unknown;
|
|
11
|
+
id?: unknown;
|
|
12
|
+
init?: unknown;
|
|
13
|
+
initialValue?: unknown;
|
|
14
|
+
outputFormat?: unknown;
|
|
15
|
+
inline?: unknown;
|
|
16
|
+
modelEvents?: unknown;
|
|
17
|
+
plugins?: unknown;
|
|
18
|
+
tagName?: unknown;
|
|
19
|
+
toolbar?: unknown;
|
|
20
|
+
modelValue?: unknown;
|
|
21
|
+
disabled?: unknown;
|
|
22
|
+
tinymceScriptSrc?: unknown;
|
|
23
|
+
} & {
|
|
9
24
|
apiKey: any;
|
|
10
25
|
cloudChannel: any;
|
|
11
26
|
id: any;
|
|
@@ -20,7 +35,7 @@ export declare const Editor: import("vue").DefineComponent<import("./EditorPropT
|
|
|
20
35
|
modelValue: any;
|
|
21
36
|
disabled: any;
|
|
22
37
|
tinymceScriptSrc: any;
|
|
23
|
-
} & {}
|
|
38
|
+
} & {}> & {}, {
|
|
24
39
|
apiKey: any;
|
|
25
40
|
cloudChannel: any;
|
|
26
41
|
id: any;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
import { RawEditorSettings } from 'tinymce';
|
|
8
9
|
export declare type CopyProps<T> = {
|
|
9
10
|
[P in keyof T]: any;
|
|
10
11
|
};
|
|
@@ -12,7 +13,7 @@ export interface IPropTypes {
|
|
|
12
13
|
apiKey: string;
|
|
13
14
|
cloudChannel: string;
|
|
14
15
|
id: string;
|
|
15
|
-
init:
|
|
16
|
+
init: RawEditorSettings;
|
|
16
17
|
initialValue: string;
|
|
17
18
|
outputFormat: 'html' | 'text';
|
|
18
19
|
inline: boolean;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2018-present, Ephox, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
1
|
export var editorProps = {
|
|
9
2
|
apiKey: String,
|
|
10
3
|
cloudChannel: String,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinymce/tinymce-vue",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5-feature.20211117013517127.sha4692fc8",
|
|
4
4
|
"description": "Official TinyMCE Vue 3 Component",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -47,34 +47,38 @@
|
|
|
47
47
|
"@storybook/addon-notes": "^5.3.21",
|
|
48
48
|
"@storybook/storybook-deployer": "^2.8.10",
|
|
49
49
|
"@storybook/vue3": "^6.4.0-alpha.9",
|
|
50
|
-
"@tinymce/beehive-flow": "^0.
|
|
50
|
+
"@tinymce/beehive-flow": "^0.17.0",
|
|
51
51
|
"@tinymce/eslint-plugin": "^1.9.1",
|
|
52
52
|
"@tinymce/miniature": "^3.2.0",
|
|
53
|
-
"@types/node": "^
|
|
53
|
+
"@types/node": "^16.7.1",
|
|
54
|
+
"@vue/compiler-sfc": "^3.0.0",
|
|
54
55
|
"babel-loader": "^8.0.5",
|
|
55
56
|
"babel-preset-vue": "^2.0.2",
|
|
56
57
|
"babel-register": "^6.26.0",
|
|
57
|
-
"css-loader": "^
|
|
58
|
+
"css-loader": "^6.2.0",
|
|
58
59
|
"file-loader": "^6.0.0",
|
|
59
|
-
"react": "^16.
|
|
60
|
-
"react-dom": "^16.
|
|
60
|
+
"react": "^16.14.0",
|
|
61
|
+
"react-dom": "^16.14.0",
|
|
62
|
+
"regenerator-runtime": "^0.13.9",
|
|
61
63
|
"rimraf": "^3.0.2",
|
|
62
|
-
"rollup": "^
|
|
64
|
+
"rollup": "^1.32.1",
|
|
63
65
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
64
|
-
"rollup-plugin-typescript2": "^0.
|
|
66
|
+
"rollup-plugin-typescript2": "^0.30.0",
|
|
65
67
|
"rollup-plugin-uglify": "^6.0.0",
|
|
66
|
-
"tinymce": "npm:tinymce@^
|
|
67
|
-
"tinymce-
|
|
68
|
-
"
|
|
69
|
-
"ts-
|
|
70
|
-
"ts-node": "^8.9.1",
|
|
71
|
-
"typescript": "^3.2.2",
|
|
68
|
+
"tinymce-4": "npm:tinymce@^4",
|
|
69
|
+
"tinymce-5": "npm:tinymce@^5",
|
|
70
|
+
"ts-loader": "^9.2.5",
|
|
71
|
+
"ts-node": "^10.2.1",
|
|
72
72
|
"tsconfig-paths-webpack-plugin": "^3.5.1",
|
|
73
|
-
"
|
|
73
|
+
"typescript": "^4.3.5",
|
|
74
|
+
"vite": "^2.5.1",
|
|
75
|
+
"vue": "^3.0.0",
|
|
74
76
|
"vue-loader": "^15.2.1",
|
|
75
77
|
"vue-router": "^4.0.0-beta.13",
|
|
76
78
|
"vue-template-compiler": "^2.6.14",
|
|
77
|
-
"webpack": "^
|
|
79
|
+
"webpack": "^5.51.1"
|
|
78
80
|
},
|
|
79
|
-
"dependencies": {
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"tinymce": "^5.5.0"
|
|
83
|
+
}
|
|
80
84
|
}
|