aloha-vue 1.2.246 → 1.2.248
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/package.json +1 -1
- package/src/AModal/AModal.js +1 -0
- package/src/AModalForm/AModalForm.js +0 -1
- package/src/AModalWizard/AModalWizard.js +0 -1
- package/src/plugins/ATinymcePlugin.js +54 -53
- package/src/ui/ATinymce/ATinymce.js +5 -0
- package/src/ui/ATinymce/compositionAPI/ATinymceAPI.js +5 -20
package/package.json
CHANGED
package/src/AModal/AModal.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ref,
|
|
3
|
-
} from "vue";
|
|
4
|
-
|
|
5
|
-
export const tinymcePluginOptions = ref({
|
|
6
|
-
propsDefault: {
|
|
7
|
-
branding: true,
|
|
8
|
-
contentCustomStyle: undefined,
|
|
9
|
-
contentLangs: [
|
|
10
|
-
{ title: "English", code: "en" },
|
|
11
|
-
{ title: "Spanish", code: "es" },
|
|
12
|
-
{ title: "French", code: "fr" },
|
|
13
|
-
{ title: "Deutsch", code: "de" },
|
|
14
|
-
{ title: "Portuguese", code: "pt" },
|
|
15
|
-
{ title: "Chinese", code: "zh" },
|
|
16
|
-
],
|
|
17
|
-
languageDefault: "de",
|
|
18
|
-
maxlength: undefined,
|
|
19
|
-
menu: undefined,
|
|
20
|
-
menubar: false,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{ name: "
|
|
27
|
-
{ name: "
|
|
28
|
-
{ name: "
|
|
29
|
-
{ name: "
|
|
30
|
-
{ name: "
|
|
31
|
-
{ name: "
|
|
32
|
-
{ name: "
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
...propsDefault,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
} from "vue";
|
|
4
|
+
|
|
5
|
+
export const tinymcePluginOptions = ref({
|
|
6
|
+
propsDefault: {
|
|
7
|
+
branding: true,
|
|
8
|
+
contentCustomStyle: undefined,
|
|
9
|
+
contentLangs: [
|
|
10
|
+
{ title: "English", code: "en" },
|
|
11
|
+
{ title: "Spanish", code: "es" },
|
|
12
|
+
{ title: "French", code: "fr" },
|
|
13
|
+
{ title: "Deutsch", code: "de" },
|
|
14
|
+
{ title: "Portuguese", code: "pt" },
|
|
15
|
+
{ title: "Chinese", code: "zh" },
|
|
16
|
+
],
|
|
17
|
+
languageDefault: "de",
|
|
18
|
+
maxlength: undefined,
|
|
19
|
+
menu: undefined,
|
|
20
|
+
menubar: false,
|
|
21
|
+
minHeightBody: 70,
|
|
22
|
+
plugins: "advlist autoresize code emoticons link lists table help example",
|
|
23
|
+
promotion: false,
|
|
24
|
+
rows: undefined,
|
|
25
|
+
toolbar: [
|
|
26
|
+
{ name: "Formatierung", items: ["bold", "italic", "underline"] },
|
|
27
|
+
{ name: "Ausrichtung", items: ["alignleft", "aligncenter", "alignright", "alignjustify"] },
|
|
28
|
+
{ name: "Liste", items: ["bullist", "numlist"] },
|
|
29
|
+
{ name: "Einrücken", items: ["indent", "outdent"] },
|
|
30
|
+
{ name: "Sprache", items: ["language"] },
|
|
31
|
+
{ name: "Link", items: ["link", "unlink"] },
|
|
32
|
+
{ name: "Historie", items: ["undo", "redo"] },
|
|
33
|
+
{ name: "Hilfe", items: ["help"] },
|
|
34
|
+
],
|
|
35
|
+
toolbarMode: "wrap",
|
|
36
|
+
validElements: "@[style],a[href|target|title],strong/b[style],em/i[style],br[style],p[style],span[style],ul[style],ol[style],li[style],table[],thead[],tbody[],th[],tr[],td[]",
|
|
37
|
+
validStyles: {
|
|
38
|
+
"*": "text-align,padding-left,text-decoration",
|
|
39
|
+
ul: "list-style-type",
|
|
40
|
+
ol: "list-style-type",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
install: (app, {
|
|
47
|
+
propsDefault = {},
|
|
48
|
+
} = {}) => {
|
|
49
|
+
tinymcePluginOptions.value.propsDefault = {
|
|
50
|
+
...tinymcePluginOptions.value.propsDefault,
|
|
51
|
+
...propsDefault,
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -75,6 +75,11 @@ export default {
|
|
|
75
75
|
required: false,
|
|
76
76
|
default: () => tinymcePluginOptions.value.propsDefault.menubar,
|
|
77
77
|
},
|
|
78
|
+
minHeightBody: {
|
|
79
|
+
type: Number,
|
|
80
|
+
required: false,
|
|
81
|
+
default: () => tinymcePluginOptions.value.propsDefault.minHeightBody,
|
|
82
|
+
},
|
|
78
83
|
plugins: {
|
|
79
84
|
type: String,
|
|
80
85
|
required: false,
|
|
@@ -56,6 +56,7 @@ export default function ATinymceAPI(props, context, {
|
|
|
56
56
|
const menu = toRef(props, "menu");
|
|
57
57
|
const menubar = toRef(props, "menubar");
|
|
58
58
|
const modelValue = toRef(props, "modelValue");
|
|
59
|
+
const minHeightBody = toRef(props, "minHeightBody");
|
|
59
60
|
const plugins = toRef(props, "plugins");
|
|
60
61
|
const promotion = toRef(props, "promotion");
|
|
61
62
|
const toolbar = toRef(props, "toolbar");
|
|
@@ -67,7 +68,8 @@ export default function ATinymceAPI(props, context, {
|
|
|
67
68
|
let modelValueLocal = undefined;
|
|
68
69
|
|
|
69
70
|
const contentStyle = computed(() => {
|
|
70
|
-
return
|
|
71
|
+
return `body { min-height: ${ minHeightBody.value }px; }
|
|
72
|
+
${ contentUiSkinCss.toString() }\n${ contentCss.toString() }\n${ contentCustomStyle.value ? contentCustomStyle.value : "" }`;
|
|
71
73
|
});
|
|
72
74
|
|
|
73
75
|
const changeModelLocal = ({ model }) => {
|
|
@@ -78,12 +80,13 @@ export default function ATinymceAPI(props, context, {
|
|
|
78
80
|
const render = () => {
|
|
79
81
|
modelValueLocal = modelValue.value;
|
|
80
82
|
tinymce.init({
|
|
83
|
+
autoresize_bottom_margin: 0,
|
|
81
84
|
branding: branding.value,
|
|
82
85
|
browser_spellcheck: true,
|
|
83
86
|
content_css: false,
|
|
84
87
|
content_langs: contentLangs.value,
|
|
85
88
|
content_style: contentStyle.value,
|
|
86
|
-
contextmenu:
|
|
89
|
+
contextmenu: false,
|
|
87
90
|
convert_urls: false,
|
|
88
91
|
entity_encoding: "raw",
|
|
89
92
|
force_br_newlines: true,
|
|
@@ -106,24 +109,6 @@ export default function ATinymceAPI(props, context, {
|
|
|
106
109
|
editor.on("change input undo redo", () => {
|
|
107
110
|
changeModelLocal({ model: editor.getContent({ format: "html" }) });
|
|
108
111
|
});
|
|
109
|
-
editor.ui.registry.addMenuItem("custompaste", {
|
|
110
|
-
text: "Paste",
|
|
111
|
-
icon: "paste",
|
|
112
|
-
shortcut: "Ctrl+V",
|
|
113
|
-
onAction: () => {
|
|
114
|
-
navigator.clipboard.readText().then(text => {
|
|
115
|
-
if (text) {
|
|
116
|
-
editor.insertContent(text);
|
|
117
|
-
}
|
|
118
|
-
}).catch(err => {
|
|
119
|
-
editor.notificationManager.open({
|
|
120
|
-
text: "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.",
|
|
121
|
-
type: "error"
|
|
122
|
-
});
|
|
123
|
-
console.error("Paste error: ", err);
|
|
124
|
-
});
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
112
|
},
|
|
128
113
|
});
|
|
129
114
|
};
|