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 CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.246",
17
+ "version": "1.2.248",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -362,6 +362,7 @@ export default {
362
362
  role: "dialog",
363
363
  ariaModal: true,
364
364
  style: this.stylesModal,
365
+ ...this.$attrs,
365
366
  }, [
366
367
  h("div", {
367
368
  class: ["a_modal_dialog a_modal_dialog_scrollable", this.sizeClass],
@@ -19,7 +19,6 @@ import {
19
19
  // @vue/component
20
20
  export default {
21
21
  name: "AModalForm",
22
- inheritAttrs: false,
23
22
  props: {
24
23
  alwaysTranslate: {
25
24
  type: Boolean,
@@ -20,7 +20,6 @@ import {
20
20
  // @vue/component
21
21
  export default {
22
22
  name: "AModalWizard",
23
- inheritAttrs: false,
24
23
  props: {
25
24
  alwaysTranslate: {
26
25
  type: Boolean,
@@ -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
- plugins: "advlist autoresize code emoticons link lists table help example",
22
- promotion: false,
23
- rows: undefined,
24
- toolbar: [
25
- { name: "Formatierung", items: ["bold", "italic", "underline"] },
26
- { name: "Ausrichtung", items: ["alignleft", "aligncenter", "alignright", "alignjustify"] },
27
- { name: "Liste", items: ["bullist", "numlist"] },
28
- { name: "Einrücken", items: ["indent", "outdent"] },
29
- { name: "Sprache", items: ["language"] },
30
- { name: "Link", items: ["link", "unlink"] },
31
- { name: "Historie", items: ["undo", "redo"] },
32
- { name: "Hilfe", items: ["help"] },
33
- ],
34
- toolbarMode: "wrap",
35
- 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[]",
36
- validStyles: {
37
- "*": "text-align,padding-left,text-decoration",
38
- ul: "list-style-type",
39
- ol: "list-style-type",
40
- },
41
- },
42
- });
43
-
44
- export default {
45
- install: (app, {
46
- propsDefault = {},
47
- } = {}) => {
48
- tinymcePluginOptions.value.propsDefault = {
49
- ...tinymcePluginOptions.value.propsDefault,
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 `${ contentUiSkinCss.toString() }\n${ contentCss.toString() }\n${ contentCustomStyle.value ? contentCustomStyle.value : "" }`;
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: "link copy custompaste",
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
  };