@zeedhi/zd-richtext-vue 1.3.1 → 1.4.0
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/dist/rich-text-vue.esm.js +478 -70
- package/dist/rich-text-vue.umd.js +486 -81
- package/package.json +10 -3
- package/types/RichText.d.ts +10 -3
- package/types/extensions/FontFamily/FontFamily.d.ts +9 -0
- package/types/index.d.ts +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-richtext-vue"] = {}, global.
|
|
5
|
-
})(this, (function (exports, Vue,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@zeedhi/core'), require('@zeedhi/vuetify'), require('vue'), require('vuetify-pro-tiptap'), require('vuetify-pro-tiptap/lib/style.css'), require('@tiptap/extension-font-family'), require('@tiptap/vue-2'), require('@zeedhi/zd-richtext-common'), require('vue-property-decorator'), require('vue-class-component')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@zeedhi/core', '@zeedhi/vuetify', 'vue', 'vuetify-pro-tiptap', 'vuetify-pro-tiptap/lib/style.css', '@tiptap/extension-font-family', '@tiptap/vue-2', '@zeedhi/zd-richtext-common', 'vue-property-decorator', 'vue-class-component'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-richtext-vue"] = {}, global.core, global["@zeedhi/vuetify"], global.vue, global["vuetify-pro-tiptap"], null, global["@tiptap/extension-font-family"], global["@tiptap/vue-2"], global["@zeedhi/zd-richtext-common"], global["vue-property-decorator"], global["vue-class-component"]));
|
|
5
|
+
})(this, (function (exports, core, vuetify$1, Vue, vuetifyProTiptap, style_css, extensionFontFamily, vue2, zdRichtextCommon, vuePropertyDecorator, Component) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);
|
|
10
|
+
var Component__default = /*#__PURE__*/_interopDefaultLegacy(Component);
|
|
10
11
|
|
|
11
12
|
/*! *****************************************************************************
|
|
12
13
|
Copyright (c) Microsoft Corporation.
|
|
@@ -34,107 +35,207 @@
|
|
|
34
35
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
const
|
|
38
|
-
|
|
38
|
+
const fonts = [
|
|
39
|
+
{ font: 'Inter', title: 'Inter' },
|
|
40
|
+
{ font: 'Roboto', title: 'Roboto' },
|
|
41
|
+
{ font: 'serif', title: 'Serif' },
|
|
42
|
+
{ font: 'monospace', title: 'Monospace' },
|
|
43
|
+
];
|
|
44
|
+
let FontFamily = class FontFamily extends vuetify$1.ZdComponentRender {
|
|
45
|
+
setFontStyle(editor, font) {
|
|
46
|
+
editor.chain().focus().setFontFamily(font).run();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
__decorate([
|
|
50
|
+
vuetify$1.PropWatch({ type: Object, default: '' }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], FontFamily.prototype, "editor", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
vuetify$1.PropWatch({ type: Object, default: '' }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], FontFamily.prototype, "attrs", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
vuetify$1.PropWatch({ type: Array, default: () => (fonts) }),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], FontFamily.prototype, "fonts", void 0);
|
|
61
|
+
FontFamily = __decorate([
|
|
62
|
+
Component__default["default"]
|
|
63
|
+
], FontFamily);
|
|
64
|
+
var script$1 = FontFamily;
|
|
65
|
+
|
|
66
|
+
let ZdRichText = class ZdRichText extends vuetify$1.ZdComponentRender {
|
|
39
67
|
constructor() {
|
|
40
68
|
super(...arguments);
|
|
41
|
-
this.extensions = [
|
|
42
|
-
Bold,
|
|
43
|
-
Italic,
|
|
44
|
-
Strike,
|
|
45
|
-
Underline,
|
|
46
|
-
[
|
|
47
|
-
Heading,
|
|
48
|
-
{
|
|
49
|
-
options: {
|
|
50
|
-
levels: [1, 2, 3],
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
Code,
|
|
55
|
-
HorizontalRule,
|
|
56
|
-
ListItem,
|
|
57
|
-
BulletList,
|
|
58
|
-
OrderedList,
|
|
59
|
-
];
|
|
60
69
|
this.instanceType = zdRichtextCommon.RichText;
|
|
61
|
-
this.
|
|
70
|
+
this.extensions = [extensionFontFamily.FontFamily];
|
|
71
|
+
this.toolbar = Vue.ref([
|
|
72
|
+
'bold',
|
|
73
|
+
'italic',
|
|
74
|
+
'underline',
|
|
75
|
+
'strike',
|
|
76
|
+
'color',
|
|
77
|
+
// "highlight",
|
|
78
|
+
'|',
|
|
79
|
+
'h1',
|
|
80
|
+
'h2',
|
|
81
|
+
'h3',
|
|
82
|
+
'h4',
|
|
83
|
+
'h5',
|
|
84
|
+
// "h6",
|
|
85
|
+
// "p",
|
|
86
|
+
'|',
|
|
87
|
+
'left',
|
|
88
|
+
'center',
|
|
89
|
+
'right',
|
|
90
|
+
'justify',
|
|
91
|
+
'|',
|
|
92
|
+
'bulletList',
|
|
93
|
+
'orderedList',
|
|
94
|
+
// "taskList",
|
|
95
|
+
// "indent",
|
|
96
|
+
// "outdent",
|
|
97
|
+
'|',
|
|
98
|
+
// "link",
|
|
99
|
+
// "image",
|
|
100
|
+
// "video",
|
|
101
|
+
// "table",
|
|
102
|
+
// "blockquote",
|
|
103
|
+
'rule',
|
|
104
|
+
'code',
|
|
105
|
+
'|',
|
|
106
|
+
// "codeBlock",
|
|
107
|
+
// "|",
|
|
108
|
+
// "clear",
|
|
109
|
+
// "fullscreen",
|
|
110
|
+
// "undo",
|
|
111
|
+
// "redo",
|
|
112
|
+
'#fontFamily',
|
|
113
|
+
]);
|
|
62
114
|
}
|
|
63
115
|
onKeyDown(event) {
|
|
64
116
|
this.instance.onKeyDown(this.$el, event.key);
|
|
65
117
|
}
|
|
66
118
|
changeLanguage() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
119
|
+
const newLanguage = core.I18n.instance.language.split('-')[0];
|
|
120
|
+
vuetifyProTiptap.locale.setLang(newLanguage);
|
|
121
|
+
}
|
|
122
|
+
input(instanceInput) {
|
|
123
|
+
if (instanceInput) {
|
|
124
|
+
this.instance.input(this.content);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
onFocus(event) {
|
|
128
|
+
this.instance.onFocus(event);
|
|
129
|
+
this.initialFocusValue = this.instance.content;
|
|
130
|
+
}
|
|
131
|
+
onBlur(event) {
|
|
132
|
+
this.instance.onBlur(event);
|
|
133
|
+
if (this.initialFocusValue !== this.instance.content) {
|
|
134
|
+
this.instance.onChange(this.instance.content);
|
|
70
135
|
}
|
|
71
|
-
this.tiptapVuetifyPlugin.vuetify.framework.lang.current = newLanguage;
|
|
72
|
-
this.componentKey += 1; // force update component render
|
|
73
136
|
}
|
|
74
137
|
mounted() {
|
|
138
|
+
var _a;
|
|
139
|
+
if (this.$refs.tiptap.editor) {
|
|
140
|
+
this.instance.formatGetter.html = this.$refs.tiptap.editor.getHTML.bind(this.$refs.tiptap.editor);
|
|
141
|
+
this.instance.formatGetter.json = this.$refs.tiptap.editor.getJSON.bind(this.$refs.tiptap.editor);
|
|
142
|
+
this.$refs.tiptap.editor.on('focus', this.onFocus);
|
|
143
|
+
this.$refs.tiptap.editor.on('blur', this.onBlur);
|
|
144
|
+
}
|
|
145
|
+
const header = this.$el.querySelector('header.py-1.ps-1.vuetify-pro-tiptap-editor__toolbar.v-sheet.v-toolbar');
|
|
146
|
+
(_a = header) === null || _a === void 0 ? void 0 : _a.style.setProperty('background-color', this.toolbarColor || 'var(--v-primary-base)', 'important');
|
|
147
|
+
if (this.cardColor) {
|
|
148
|
+
const card = this.$el.querySelector('.vuetify-pro-tiptap-editor__content');
|
|
149
|
+
card.style.setProperty('background-color', this.cardColor, 'important');
|
|
150
|
+
}
|
|
75
151
|
this.changeLanguage();
|
|
76
152
|
if (this.instance.fillHeight) {
|
|
77
|
-
vuetify.setFillHeight(this.$el);
|
|
153
|
+
vuetify$1.setFillHeight(this.$el);
|
|
78
154
|
}
|
|
79
155
|
core.I18n.registerChangeListener(this.changeLanguage);
|
|
80
156
|
}
|
|
81
157
|
destroyed() {
|
|
82
158
|
core.I18n.unregisterChangeListener(this.changeLanguage);
|
|
159
|
+
this.$refs.tiptap.editor.off('focus', this.onFocus);
|
|
160
|
+
this.$refs.tiptap.editor.off('blur', this.onBlur);
|
|
83
161
|
}
|
|
84
162
|
};
|
|
85
163
|
__decorate([
|
|
86
|
-
vuetify.PropWatch({ type: String, default: '
|
|
164
|
+
vuetify$1.PropWatch({ type: String, default: 'html' }),
|
|
87
165
|
__metadata("design:type", String)
|
|
88
166
|
], ZdRichText.prototype, "outputFormat", void 0);
|
|
89
167
|
__decorate([
|
|
90
|
-
vuetify.PropWatch({ type: String, default: '' }),
|
|
168
|
+
vuetify$1.PropWatch({ type: String, default: '' }),
|
|
91
169
|
__metadata("design:type", String)
|
|
92
170
|
], ZdRichText.prototype, "placeholder", void 0);
|
|
93
171
|
__decorate([
|
|
94
|
-
vuetify.PropWatch({
|
|
172
|
+
vuetify$1.PropWatch({
|
|
95
173
|
type: [Boolean, String],
|
|
96
174
|
default: false,
|
|
97
175
|
}),
|
|
98
176
|
__metadata("design:type", Object)
|
|
99
177
|
], ZdRichText.prototype, "disabled", void 0);
|
|
100
178
|
__decorate([
|
|
101
|
-
vuetify.PropWatch({ type: String, default: undefined }),
|
|
179
|
+
vuetify$1.PropWatch({ type: String, default: undefined }),
|
|
102
180
|
__metadata("design:type", String)
|
|
103
181
|
], ZdRichText.prototype, "toolbarColor", void 0);
|
|
104
182
|
__decorate([
|
|
105
|
-
vuetify.PropWatch({ type: String, default: '' }),
|
|
183
|
+
vuetify$1.PropWatch({ type: String, default: '' }),
|
|
184
|
+
__metadata("design:type", String)
|
|
185
|
+
], ZdRichText.prototype, "content", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
vuetify$1.PropWatch({ type: String, default: '' }),
|
|
106
188
|
__metadata("design:type", String)
|
|
107
189
|
], ZdRichText.prototype, "cardColor", void 0);
|
|
108
190
|
__decorate([
|
|
109
|
-
vuetify.PropWatch({
|
|
191
|
+
vuetify$1.PropWatch({ type: Array, default: () => (fonts) }),
|
|
192
|
+
__metadata("design:type", Array)
|
|
193
|
+
], ZdRichText.prototype, "fonts", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
vuetify$1.PropWatch({
|
|
110
196
|
type: [Boolean, String],
|
|
111
197
|
default: false,
|
|
112
198
|
}),
|
|
113
199
|
__metadata("design:type", Object)
|
|
114
200
|
], ZdRichText.prototype, "outlined", void 0);
|
|
115
201
|
__decorate([
|
|
116
|
-
vuetify.PropWatch({
|
|
202
|
+
vuetify$1.PropWatch({
|
|
117
203
|
type: [Number, String],
|
|
118
204
|
default: '',
|
|
119
205
|
}),
|
|
120
206
|
__metadata("design:type", Object)
|
|
121
207
|
], ZdRichText.prototype, "width", void 0);
|
|
122
208
|
__decorate([
|
|
123
|
-
vuetify.PropWatch({
|
|
209
|
+
vuetify$1.PropWatch({
|
|
124
210
|
type: [Number, String],
|
|
125
211
|
default: '',
|
|
126
212
|
}),
|
|
127
213
|
__metadata("design:type", Object)
|
|
128
214
|
], ZdRichText.prototype, "height", void 0);
|
|
129
215
|
__decorate([
|
|
130
|
-
vuetify.PropWatch({
|
|
216
|
+
vuetify$1.PropWatch({
|
|
217
|
+
type: [Object],
|
|
218
|
+
default: () => { },
|
|
219
|
+
}),
|
|
220
|
+
__metadata("design:type", Object)
|
|
221
|
+
], ZdRichText.prototype, "formatGetter", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
vuetify$1.PropWatch({
|
|
131
224
|
type: [Boolean, String],
|
|
132
225
|
default: false,
|
|
133
226
|
}),
|
|
134
227
|
__metadata("design:type", Boolean)
|
|
135
228
|
], ZdRichText.prototype, "fillHeight", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
vuePropertyDecorator.Watch('instance.content'),
|
|
231
|
+
__metadata("design:type", Function),
|
|
232
|
+
__metadata("design:paramtypes", [String]),
|
|
233
|
+
__metadata("design:returntype", void 0)
|
|
234
|
+
], ZdRichText.prototype, "input", null);
|
|
136
235
|
ZdRichText = __decorate([
|
|
137
|
-
vuePropertyDecorator.Component
|
|
236
|
+
vuePropertyDecorator.Component({
|
|
237
|
+
components: { EditorContent: vue2.EditorContent },
|
|
238
|
+
})
|
|
138
239
|
], ZdRichText);
|
|
139
240
|
var script = ZdRichText;
|
|
140
241
|
|
|
@@ -267,10 +368,10 @@
|
|
|
267
368
|
}
|
|
268
369
|
|
|
269
370
|
/* script */
|
|
270
|
-
const __vue_script__ = script;
|
|
371
|
+
const __vue_script__$1 = script;
|
|
271
372
|
|
|
272
373
|
/* template */
|
|
273
|
-
var __vue_render__ = function () {
|
|
374
|
+
var __vue_render__$1 = function () {
|
|
274
375
|
var _vm = this;
|
|
275
376
|
var _h = _vm.$createElement;
|
|
276
377
|
var _c = _vm._self._c || _h;
|
|
@@ -285,41 +386,72 @@
|
|
|
285
386
|
expression: "instance.isVisible",
|
|
286
387
|
},
|
|
287
388
|
],
|
|
288
|
-
class: ["zd-rich-text", _vm.instance.cssClass],
|
|
389
|
+
class: ["zd-rich-text", "zd-elevation-2", _vm.instance.cssClass],
|
|
289
390
|
style: {
|
|
290
391
|
height: _vm.$formatSize(_vm.instance.height),
|
|
291
392
|
},
|
|
292
393
|
attrs: { id: _vm.instance.name, name: _vm.instance.name },
|
|
394
|
+
on: {
|
|
395
|
+
keydown: function ($event) {
|
|
396
|
+
return _vm.onKeyDown($event)
|
|
397
|
+
},
|
|
398
|
+
},
|
|
293
399
|
},
|
|
294
400
|
[
|
|
295
|
-
_c("tiptap
|
|
296
|
-
|
|
401
|
+
_c("vuetify-tiptap", {
|
|
402
|
+
ref: "tiptap",
|
|
297
403
|
attrs: {
|
|
298
|
-
|
|
404
|
+
markdownTheme: false,
|
|
405
|
+
dark: _vm.instance.dark,
|
|
406
|
+
disabled: _vm.instance.disabled,
|
|
407
|
+
outlined: _vm.instance.outlined,
|
|
408
|
+
placeholder: _vm.instance.placeholder,
|
|
409
|
+
toolbar: _vm.toolbar,
|
|
410
|
+
rounded: "",
|
|
411
|
+
"max-width": _vm.instance.width,
|
|
299
412
|
extensions: _vm.extensions,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
413
|
+
},
|
|
414
|
+
scopedSlots: _vm._u([
|
|
415
|
+
{
|
|
416
|
+
key: "editor",
|
|
417
|
+
fn: function (ref) {
|
|
418
|
+
var editor = ref.editor;
|
|
419
|
+
var attrs = ref.attrs;
|
|
420
|
+
return [
|
|
421
|
+
_c("editor-content", {
|
|
422
|
+
staticClass:
|
|
423
|
+
"vuetify-pro-tiptap-editor__content zd-rich-text-content markdown-theme-github",
|
|
424
|
+
class: [{ __dark: attrs.isDark }, attrs.editorClass],
|
|
425
|
+
style: attrs.contentDynamicStyles,
|
|
426
|
+
attrs: { editor: editor, "data-testid": "value" },
|
|
427
|
+
}),
|
|
428
|
+
]
|
|
429
|
+
},
|
|
304
430
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
height: "100%",
|
|
311
|
-
style: _vm.instance.cssStyle,
|
|
312
|
-
dark: _vm.instance.dark,
|
|
313
|
-
light: _vm.instance.light,
|
|
431
|
+
{
|
|
432
|
+
key: "bottom",
|
|
433
|
+
fn: function (ref) {
|
|
434
|
+
return [_c("span")]
|
|
435
|
+
},
|
|
314
436
|
},
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
437
|
+
{
|
|
438
|
+
key: "fontFamily",
|
|
439
|
+
fn: function (ref) {
|
|
440
|
+
var editor = ref.editor;
|
|
441
|
+
var attrs = ref.attrs;
|
|
442
|
+
return [
|
|
443
|
+
_c("FontFamily", {
|
|
444
|
+
attrs: {
|
|
445
|
+
name: _vm.instance.name + "-fontFamily",
|
|
446
|
+
editor: editor,
|
|
447
|
+
attrs: attrs,
|
|
448
|
+
fonts: _vm.instance.fonts,
|
|
449
|
+
},
|
|
450
|
+
}),
|
|
451
|
+
]
|
|
452
|
+
},
|
|
321
453
|
},
|
|
322
|
-
|
|
454
|
+
]),
|
|
323
455
|
model: {
|
|
324
456
|
value: _vm.instance.content,
|
|
325
457
|
callback: function ($$v) {
|
|
@@ -332,21 +464,150 @@
|
|
|
332
464
|
1
|
|
333
465
|
)
|
|
334
466
|
};
|
|
335
|
-
var __vue_staticRenderFns__ = [];
|
|
336
|
-
__vue_render__._withStripped = true;
|
|
467
|
+
var __vue_staticRenderFns__$1 = [];
|
|
468
|
+
__vue_render__$1._withStripped = true;
|
|
337
469
|
|
|
338
470
|
/* style */
|
|
339
|
-
const __vue_inject_styles__ = function (inject) {
|
|
471
|
+
const __vue_inject_styles__$1 = function (inject) {
|
|
340
472
|
if (!inject) return
|
|
341
|
-
inject("data-v-
|
|
473
|
+
inject("data-v-dca47842_0", { source: ".zd-rich-text #tippy-1 {\n display: none;\n}\n.zd-rich-text .vuetify-pro-tiptap-editor.v-card.v-card--flat.v-sheet.theme--light.rounded {\n background-color: #ffffff !important;\n}\n.zd-rich-text .vuetify-pro-tiptap-editor.v-card.v-card--flat.v-sheet.theme--dark.rounded {\n background-color: #383838 !important;\n}\n.zd-rich-text .v-toolbar__content button.v-btn {\n color: #ffffff !important;\n}", map: undefined, media: undefined });
|
|
342
474
|
|
|
343
475
|
};
|
|
344
476
|
/* scoped */
|
|
477
|
+
const __vue_scope_id__$1 = undefined;
|
|
478
|
+
/* module identifier */
|
|
479
|
+
const __vue_module_identifier__$1 = undefined;
|
|
480
|
+
/* functional template */
|
|
481
|
+
const __vue_is_functional_template__$1 = false;
|
|
482
|
+
/* style inject SSR */
|
|
483
|
+
|
|
484
|
+
/* style inject shadow dom */
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
489
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
490
|
+
__vue_inject_styles__$1,
|
|
491
|
+
__vue_script__$1,
|
|
492
|
+
__vue_scope_id__$1,
|
|
493
|
+
__vue_is_functional_template__$1,
|
|
494
|
+
__vue_module_identifier__$1,
|
|
495
|
+
false,
|
|
496
|
+
createInjector,
|
|
497
|
+
undefined,
|
|
498
|
+
undefined
|
|
499
|
+
);
|
|
500
|
+
|
|
501
|
+
/* script */
|
|
502
|
+
const __vue_script__ = script$1;
|
|
503
|
+
|
|
504
|
+
/* template */
|
|
505
|
+
var __vue_render__ = function () {
|
|
506
|
+
var _vm = this;
|
|
507
|
+
var _h = _vm.$createElement;
|
|
508
|
+
var _c = _vm._self._c || _h;
|
|
509
|
+
return _c(
|
|
510
|
+
"v-menu",
|
|
511
|
+
{
|
|
512
|
+
attrs: { "offset-y": "" },
|
|
513
|
+
scopedSlots: _vm._u([
|
|
514
|
+
{
|
|
515
|
+
key: "activator",
|
|
516
|
+
fn: function (ref) {
|
|
517
|
+
var onMenu = ref.on;
|
|
518
|
+
var attrs = ref.attrs;
|
|
519
|
+
return [
|
|
520
|
+
_c(
|
|
521
|
+
"v-tooltip",
|
|
522
|
+
{
|
|
523
|
+
attrs: { bottom: "" },
|
|
524
|
+
scopedSlots: _vm._u(
|
|
525
|
+
[
|
|
526
|
+
{
|
|
527
|
+
key: "activator",
|
|
528
|
+
fn: function (ref) {
|
|
529
|
+
var onTooltip = ref.on;
|
|
530
|
+
return [
|
|
531
|
+
_c(
|
|
532
|
+
"v-btn",
|
|
533
|
+
_vm._g(
|
|
534
|
+
_vm._b(
|
|
535
|
+
{
|
|
536
|
+
attrs: {
|
|
537
|
+
color: "primary",
|
|
538
|
+
dark: "",
|
|
539
|
+
text: "",
|
|
540
|
+
"aria-label": "Font Family",
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
"v-btn",
|
|
544
|
+
attrs,
|
|
545
|
+
false
|
|
546
|
+
),
|
|
547
|
+
Object.assign({}, onMenu, onTooltip)
|
|
548
|
+
),
|
|
549
|
+
[
|
|
550
|
+
_c("v-icon", [
|
|
551
|
+
_vm._v(
|
|
552
|
+
_vm._s(_vm.$getIcon("mdi-format-font"))
|
|
553
|
+
),
|
|
554
|
+
]),
|
|
555
|
+
],
|
|
556
|
+
1
|
|
557
|
+
),
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
],
|
|
562
|
+
null,
|
|
563
|
+
true
|
|
564
|
+
),
|
|
565
|
+
},
|
|
566
|
+
[_vm._v(" "), _c("span", [_vm._v("Font Family")])]
|
|
567
|
+
),
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
]),
|
|
572
|
+
},
|
|
573
|
+
[
|
|
574
|
+
_vm._v(" "),
|
|
575
|
+
_c(
|
|
576
|
+
"v-list",
|
|
577
|
+
_vm._l(_vm.fonts, function (item, index) {
|
|
578
|
+
return _c(
|
|
579
|
+
"v-list-item",
|
|
580
|
+
{
|
|
581
|
+
key: index,
|
|
582
|
+
on: {
|
|
583
|
+
click: function ($event) {
|
|
584
|
+
return _vm.setFontStyle(_vm.editor, item.font)
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
[_c("v-list-item-title", [_vm._v(_vm._s(item.title))])],
|
|
589
|
+
1
|
|
590
|
+
)
|
|
591
|
+
}),
|
|
592
|
+
1
|
|
593
|
+
),
|
|
594
|
+
],
|
|
595
|
+
1
|
|
596
|
+
)
|
|
597
|
+
};
|
|
598
|
+
var __vue_staticRenderFns__ = [];
|
|
599
|
+
__vue_render__._withStripped = true;
|
|
600
|
+
|
|
601
|
+
/* style */
|
|
602
|
+
const __vue_inject_styles__ = undefined;
|
|
603
|
+
/* scoped */
|
|
345
604
|
const __vue_scope_id__ = undefined;
|
|
346
605
|
/* module identifier */
|
|
347
606
|
const __vue_module_identifier__ = undefined;
|
|
348
607
|
/* functional template */
|
|
349
608
|
const __vue_is_functional_template__ = false;
|
|
609
|
+
/* style inject */
|
|
610
|
+
|
|
350
611
|
/* style inject SSR */
|
|
351
612
|
|
|
352
613
|
/* style inject shadow dom */
|
|
@@ -361,22 +622,166 @@
|
|
|
361
622
|
__vue_is_functional_template__,
|
|
362
623
|
__vue_module_identifier__,
|
|
363
624
|
false,
|
|
364
|
-
|
|
625
|
+
undefined,
|
|
365
626
|
undefined,
|
|
366
627
|
undefined
|
|
367
628
|
);
|
|
368
629
|
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
630
|
+
const vuetify = new vuetify$1.Vuetify();
|
|
631
|
+
const VuetifyProTipTap = vuetifyProTiptap.createVuetifyProTipTap({
|
|
632
|
+
vuetify,
|
|
633
|
+
components: {
|
|
634
|
+
VuetifyTiptap: vuetifyProTiptap.VuetifyTiptap,
|
|
635
|
+
FontFamily: __vue_component__,
|
|
636
|
+
},
|
|
374
637
|
});
|
|
375
|
-
Vue__default["default"].
|
|
638
|
+
Vue__default["default"].use(VuetifyProTipTap);
|
|
376
639
|
const packageContent = require('../package.json');
|
|
377
|
-
core.VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
640
|
+
core.VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
641
|
+
vuetifyProTiptap.locale.setMessage('pt', {
|
|
642
|
+
'editor.words': 'PALAVRAS',
|
|
643
|
+
'editor.characters': 'CARACTERES',
|
|
644
|
+
'editor.bold.tooltip': 'Negrito',
|
|
645
|
+
'editor.italic.tooltip': 'Itálico',
|
|
646
|
+
'editor.underline.tooltip': 'Sublinhado',
|
|
647
|
+
'editor.strike.tooltip': 'Riscado',
|
|
648
|
+
'editor.color.tooltip': 'Cor',
|
|
649
|
+
'editor.highlight.tooltip': 'Realçar',
|
|
650
|
+
'editor.heading.h1.tooltip': 'Título 1',
|
|
651
|
+
'editor.heading.h2.tooltip': 'Título 2',
|
|
652
|
+
'editor.heading.h3.tooltip': 'Título 3',
|
|
653
|
+
'editor.heading.h4.tooltip': 'Título 4',
|
|
654
|
+
'editor.heading.h5.tooltip': 'Título 5',
|
|
655
|
+
'editor.heading.h6.tooltip': 'Título 6',
|
|
656
|
+
'editor.paragraph.tooltip': 'Parágrafo',
|
|
657
|
+
'editor.left.tooltip': 'Alinhar à Esquerda',
|
|
658
|
+
'editor.center.tooltip': 'Centralizar',
|
|
659
|
+
'editor.right.tooltip': 'Alinhar à Direita',
|
|
660
|
+
'editor.justify.tooltip': 'Justificar',
|
|
661
|
+
'editor.bulletlist.tooltip': 'Lista com Marcadores',
|
|
662
|
+
'editor.orderedlist.tooltip': 'Lista Numerada',
|
|
663
|
+
'editor.tasklist.tooltip': 'Lista de Tarefas',
|
|
664
|
+
'editor.indent.tooltip': 'Recuar',
|
|
665
|
+
'editor.outdent.tooltip': 'Recuar Menos',
|
|
666
|
+
'editor.link.tooltip': 'Link',
|
|
667
|
+
'editor.link.dialog.title': 'Inserir link',
|
|
668
|
+
'editor.link.dialog.link': 'link',
|
|
669
|
+
'editor.link.dialog.button.apply': 'aplicar',
|
|
670
|
+
'editor.image.tooltip': 'Imagem',
|
|
671
|
+
'editor.image.float.left.tooltip': 'Flutuar à Esquerda',
|
|
672
|
+
'editor.image.float.none.tooltip': 'Sem Flutuação',
|
|
673
|
+
'editor.image.float.right.tooltip': 'Flutuar à Direita',
|
|
674
|
+
'editor.image.size.small.tooltip': 'Pequeno',
|
|
675
|
+
'editor.image.size.medium.tooltip': 'Médio',
|
|
676
|
+
'editor.image.size.large.tooltip': 'Grande',
|
|
677
|
+
'editor.image.remove.tooltip': 'Remover',
|
|
678
|
+
'editor.image.dialog.title': 'Inserir imagem',
|
|
679
|
+
'editor.image.dialog.tab.url': 'URL',
|
|
680
|
+
'editor.image.dialog.tab.upload': 'Upload',
|
|
681
|
+
'editor.image.dialog.form.link': 'Link',
|
|
682
|
+
'editor.image.dialog.form.alt': 'Alt',
|
|
683
|
+
'editor.image.dialog.form.aspectRatio': 'Manter Proporções Originais',
|
|
684
|
+
'editor.image.dialog.form.file': 'Arquivo',
|
|
685
|
+
'editor.image.dialog.button.apply': 'Aplicar',
|
|
686
|
+
'editor.video.tooltip': 'Vídeo',
|
|
687
|
+
'editor.video.dialog.title': 'Inserir vídeo',
|
|
688
|
+
'editor.video.dialog.link': 'link',
|
|
689
|
+
'editor.video.dialog.button.apply': 'Aplicar',
|
|
690
|
+
'editor.video.remove.tooltip': 'Remover',
|
|
691
|
+
'editor.table.tooltip': 'Tabela',
|
|
692
|
+
'editor.table.menu.insert_table': 'Inserir Tabela',
|
|
693
|
+
'editor.table.menu.insert_table.with_header_row': 'Com Linha de Cabeçalho',
|
|
694
|
+
'editor.table.menu.add_column_before': 'Adicionar Coluna Antes',
|
|
695
|
+
'editor.table.menu.add_column_after': 'Adicionar Coluna Depois',
|
|
696
|
+
'editor.table.menu.delete_column': 'Excluir Coluna',
|
|
697
|
+
'editor.table.menu.add_row_before': 'Adicionar Linha Antes',
|
|
698
|
+
'editor.table.menu.add_row_after': 'Adicionar Linha Depois',
|
|
699
|
+
'editor.table.menu.delete_row': 'Excluir Linha',
|
|
700
|
+
'editor.table.menu.merge_or_split_cells': 'Mesclar ou Dividir Células',
|
|
701
|
+
'editor.table.menu.delete_table': 'Excluir Tabela',
|
|
702
|
+
'editor.blockquote.tooltip': 'Citação',
|
|
703
|
+
'editor.horizontalrule.tooltip': 'Linha Horizontal',
|
|
704
|
+
'editor.code.tooltip': 'Código',
|
|
705
|
+
'editor.codeblock.tooltip': 'Bloco de Código',
|
|
706
|
+
'editor.clear.tooltip': 'Limpar Formatação',
|
|
707
|
+
'editor.undo.tooltip': 'Desfazer',
|
|
708
|
+
'editor.redo.tooltip': 'Refazer',
|
|
709
|
+
'editor.fullscreen.tooltip.fullscreen': 'Tela Cheia',
|
|
710
|
+
'editor.fullscreen.tooltip.exit': 'Sair da Tela Cheia',
|
|
711
|
+
});
|
|
712
|
+
vuetifyProTiptap.locale.setMessage('es', {
|
|
713
|
+
'editor.words': 'PALABRAS',
|
|
714
|
+
'editor.characters': 'CARACTERES',
|
|
715
|
+
'editor.bold.tooltip': 'Negrita',
|
|
716
|
+
'editor.italic.tooltip': 'Cursiva',
|
|
717
|
+
'editor.underline.tooltip': 'Subrayado',
|
|
718
|
+
'editor.strike.tooltip': 'Tachado',
|
|
719
|
+
'editor.color.tooltip': 'Color',
|
|
720
|
+
'editor.highlight.tooltip': 'Resaltar',
|
|
721
|
+
'editor.heading.h1.tooltip': 'Encabezado 1',
|
|
722
|
+
'editor.heading.h2.tooltip': 'Encabezado 2',
|
|
723
|
+
'editor.heading.h3.tooltip': 'Encabezado 3',
|
|
724
|
+
'editor.heading.h4.tooltip': 'Encabezado 4',
|
|
725
|
+
'editor.heading.h5.tooltip': 'Encabezado 5',
|
|
726
|
+
'editor.heading.h6.tooltip': 'Encabezado 6',
|
|
727
|
+
'editor.paragraph.tooltip': 'Párrafo',
|
|
728
|
+
'editor.left.tooltip': 'Alinear a la Izquierda',
|
|
729
|
+
'editor.center.tooltip': 'Centrar',
|
|
730
|
+
'editor.right.tooltip': 'Alinear a la Derecha',
|
|
731
|
+
'editor.justify.tooltip': 'Justificar',
|
|
732
|
+
'editor.bulletlist.tooltip': 'Lista con Viñetas',
|
|
733
|
+
'editor.orderedlist.tooltip': 'Lista Numerada',
|
|
734
|
+
'editor.tasklist.tooltip': 'Lista de Tareas',
|
|
735
|
+
'editor.indent.tooltip': 'Sangrar',
|
|
736
|
+
'editor.outdent.tooltip': 'Reducir Sangría',
|
|
737
|
+
'editor.link.tooltip': 'Enlace',
|
|
738
|
+
'editor.link.dialog.title': 'Insertar enlace',
|
|
739
|
+
'editor.link.dialog.link': 'enlace',
|
|
740
|
+
'editor.link.dialog.button.apply': 'aplicar',
|
|
741
|
+
'editor.image.tooltip': 'Imagen',
|
|
742
|
+
'editor.image.float.left.tooltip': 'Alinear a la Izquierda',
|
|
743
|
+
'editor.image.float.none.tooltip': 'Sin Alineación',
|
|
744
|
+
'editor.image.float.right.tooltip': 'Alinear a la Derecha',
|
|
745
|
+
'editor.image.size.small.tooltip': 'Pequeño',
|
|
746
|
+
'editor.image.size.medium.tooltip': 'Mediano',
|
|
747
|
+
'editor.image.size.large.tooltip': 'Grande',
|
|
748
|
+
'editor.image.remove.tooltip': 'Eliminar',
|
|
749
|
+
'editor.image.dialog.title': 'Insertar imagen',
|
|
750
|
+
'editor.image.dialog.tab.url': 'URL',
|
|
751
|
+
'editor.image.dialog.tab.upload': 'Subir',
|
|
752
|
+
'editor.image.dialog.form.link': 'Enlace',
|
|
753
|
+
'editor.image.dialog.form.alt': 'Texto Alternativo',
|
|
754
|
+
'editor.image.dialog.form.aspectRatio': 'Mantener proporciones originales',
|
|
755
|
+
'editor.image.dialog.form.file': 'Archivo',
|
|
756
|
+
'editor.image.dialog.button.apply': 'Aplicar',
|
|
757
|
+
'editor.video.tooltip': 'Video',
|
|
758
|
+
'editor.video.dialog.title': 'Insertar video',
|
|
759
|
+
'editor.video.dialog.link': 'Enlace',
|
|
760
|
+
'editor.video.dialog.button.apply': 'Aplicar',
|
|
761
|
+
'editor.video.remove.tooltip': 'Eliminar',
|
|
762
|
+
'editor.table.tooltip': 'Tabla',
|
|
763
|
+
'editor.table.menu.insert_table': 'Insertar tabla',
|
|
764
|
+
'editor.table.menu.insert_table.with_header_row': 'Con fila de encabezado',
|
|
765
|
+
'editor.table.menu.add_column_before': 'Agregar columna antes',
|
|
766
|
+
'editor.table.menu.add_column_after': 'Agregar columna después',
|
|
767
|
+
'editor.table.menu.delete_column': 'Eliminar columna',
|
|
768
|
+
'editor.table.menu.add_row_before': 'Agregar fila antes',
|
|
769
|
+
'editor.table.menu.add_row_after': 'Agregar fila después',
|
|
770
|
+
'editor.table.menu.delete_row': 'Eliminar fila',
|
|
771
|
+
'editor.table.menu.merge_or_split_cells': 'Combinar o dividir celdas',
|
|
772
|
+
'editor.table.menu.delete_table': 'Eliminar tabla',
|
|
773
|
+
'editor.blockquote.tooltip': 'Cita en bloque',
|
|
774
|
+
'editor.horizontalrule.tooltip': 'Línea horizontal',
|
|
775
|
+
'editor.code.tooltip': 'Código',
|
|
776
|
+
'editor.codeblock.tooltip': 'Bloque de código',
|
|
777
|
+
'editor.clear.tooltip': 'Borrar formato',
|
|
778
|
+
'editor.undo.tooltip': 'Deshacer',
|
|
779
|
+
'editor.redo.tooltip': 'Rehacer',
|
|
780
|
+
'editor.fullscreen.tooltip.fullscreen': 'Pantalla completa',
|
|
781
|
+
'editor.fullscreen.tooltip.exit': 'Salir de pantalla completa',
|
|
782
|
+
});
|
|
378
783
|
|
|
379
|
-
exports.ZdRichText = __vue_component__;
|
|
784
|
+
exports.ZdRichText = __vue_component__$1;
|
|
380
785
|
|
|
381
786
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
382
787
|
|