@zeedhi/zd-richtext-vue 1.2.3 → 1.3.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 +18 -3
- package/dist/rich-text-vue.umd.js +17 -2
- package/package.json +2 -2
- package/types/RichText.d.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import { VersionService } from '@zeedhi/core';
|
|
3
|
-
import { PropWatch, ZdComponentRender, Vuetify } from '@zeedhi/vuetify';
|
|
3
|
+
import { PropWatch, ZdComponentRender, setFillHeight, Vuetify } from '@zeedhi/vuetify';
|
|
4
4
|
import { Component } from 'vue-property-decorator';
|
|
5
5
|
import { RichText } from '@zeedhi/zd-richtext-common';
|
|
6
6
|
import 'tiptap-vuetify/dist/main.css';
|
|
@@ -59,6 +59,11 @@ let ZdRichText = class ZdRichText extends ZdComponentRender {
|
|
|
59
59
|
onKeyDown(event) {
|
|
60
60
|
this.instance.onKeyDown(this.$el, event.key);
|
|
61
61
|
}
|
|
62
|
+
mounted() {
|
|
63
|
+
if (this.instance.fillHeight) {
|
|
64
|
+
setFillHeight(this.$el);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
62
67
|
};
|
|
63
68
|
__decorate([
|
|
64
69
|
PropWatch({ type: String, default: 'json' }),
|
|
@@ -104,6 +109,13 @@ __decorate([
|
|
|
104
109
|
}),
|
|
105
110
|
__metadata("design:type", Object)
|
|
106
111
|
], ZdRichText.prototype, "height", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
PropWatch({
|
|
114
|
+
type: [Boolean, String],
|
|
115
|
+
default: false,
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", Boolean)
|
|
118
|
+
], ZdRichText.prototype, "fillHeight", void 0);
|
|
107
119
|
ZdRichText = __decorate([
|
|
108
120
|
Component
|
|
109
121
|
], ZdRichText);
|
|
@@ -257,6 +269,9 @@ var __vue_render__ = function () {
|
|
|
257
269
|
},
|
|
258
270
|
],
|
|
259
271
|
class: ["zd-rich-text", _vm.instance.cssClass],
|
|
272
|
+
style: {
|
|
273
|
+
height: _vm.$formatSize(_vm.instance.height),
|
|
274
|
+
},
|
|
260
275
|
attrs: { id: _vm.instance.name, name: _vm.instance.name },
|
|
261
276
|
},
|
|
262
277
|
[
|
|
@@ -274,7 +289,7 @@ var __vue_render__ = function () {
|
|
|
274
289
|
class: "zd-rich-text-content rounded-b-md",
|
|
275
290
|
outlined: _vm.instance.outlined,
|
|
276
291
|
width: _vm.instance.width,
|
|
277
|
-
height:
|
|
292
|
+
height: "100%",
|
|
278
293
|
style: _vm.instance.cssStyle,
|
|
279
294
|
dark: _vm.instance.dark,
|
|
280
295
|
light: _vm.instance.light,
|
|
@@ -305,7 +320,7 @@ __vue_render__._withStripped = true;
|
|
|
305
320
|
/* style */
|
|
306
321
|
const __vue_inject_styles__ = function (inject) {
|
|
307
322
|
if (!inject) return
|
|
308
|
-
inject("data-v-
|
|
323
|
+
inject("data-v-607b4853_0", { source: ".zd-rich-text button.v-btn {\n color: #ffffff !important;\n}\n.zd-rich-text-content.theme--dark {\n background-color: #383838;\n}\n.zd-rich-text .tiptap-vuetify-editor {\n height: 100%;\n}\n.zd-rich-text div.v-card {\n display: flex;\n flex-direction: column;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__toolbar {\n display: flex;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__toolbar header {\n background-color: var(--v-primary-base);\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content {\n flex-grow: 1;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror {\n margin: var(--spacing-2) !important;\n height: 100%;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror p {\n margin-top: var(--spacing-2) !important;\n margin-bottom: var(--spacing-2) !important;\n}", map: undefined, media: undefined });
|
|
309
324
|
|
|
310
325
|
};
|
|
311
326
|
/* scoped */
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
onKeyDown(event) {
|
|
63
63
|
this.instance.onKeyDown(this.$el, event.key);
|
|
64
64
|
}
|
|
65
|
+
mounted() {
|
|
66
|
+
if (this.instance.fillHeight) {
|
|
67
|
+
vuetify.setFillHeight(this.$el);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
65
70
|
};
|
|
66
71
|
__decorate([
|
|
67
72
|
vuetify.PropWatch({ type: String, default: 'json' }),
|
|
@@ -107,6 +112,13 @@
|
|
|
107
112
|
}),
|
|
108
113
|
__metadata("design:type", Object)
|
|
109
114
|
], ZdRichText.prototype, "height", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
vuetify.PropWatch({
|
|
117
|
+
type: [Boolean, String],
|
|
118
|
+
default: false,
|
|
119
|
+
}),
|
|
120
|
+
__metadata("design:type", Boolean)
|
|
121
|
+
], ZdRichText.prototype, "fillHeight", void 0);
|
|
110
122
|
ZdRichText = __decorate([
|
|
111
123
|
vuePropertyDecorator.Component
|
|
112
124
|
], ZdRichText);
|
|
@@ -260,6 +272,9 @@
|
|
|
260
272
|
},
|
|
261
273
|
],
|
|
262
274
|
class: ["zd-rich-text", _vm.instance.cssClass],
|
|
275
|
+
style: {
|
|
276
|
+
height: _vm.$formatSize(_vm.instance.height),
|
|
277
|
+
},
|
|
263
278
|
attrs: { id: _vm.instance.name, name: _vm.instance.name },
|
|
264
279
|
},
|
|
265
280
|
[
|
|
@@ -277,7 +292,7 @@
|
|
|
277
292
|
class: "zd-rich-text-content rounded-b-md",
|
|
278
293
|
outlined: _vm.instance.outlined,
|
|
279
294
|
width: _vm.instance.width,
|
|
280
|
-
height:
|
|
295
|
+
height: "100%",
|
|
281
296
|
style: _vm.instance.cssStyle,
|
|
282
297
|
dark: _vm.instance.dark,
|
|
283
298
|
light: _vm.instance.light,
|
|
@@ -308,7 +323,7 @@
|
|
|
308
323
|
/* style */
|
|
309
324
|
const __vue_inject_styles__ = function (inject) {
|
|
310
325
|
if (!inject) return
|
|
311
|
-
inject("data-v-
|
|
326
|
+
inject("data-v-607b4853_0", { source: ".zd-rich-text button.v-btn {\n color: #ffffff !important;\n}\n.zd-rich-text-content.theme--dark {\n background-color: #383838;\n}\n.zd-rich-text .tiptap-vuetify-editor {\n height: 100%;\n}\n.zd-rich-text div.v-card {\n display: flex;\n flex-direction: column;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__toolbar {\n display: flex;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__toolbar header {\n background-color: var(--v-primary-base);\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content {\n flex-grow: 1;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror {\n margin: var(--spacing-2) !important;\n height: 100%;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror p {\n margin-top: var(--spacing-2) !important;\n margin-bottom: var(--spacing-2) !important;\n}", map: undefined, media: undefined });
|
|
312
327
|
|
|
313
328
|
};
|
|
314
329
|
/* scoped */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/zd-richtext-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "RichTextVue by BVR",
|
|
5
5
|
"main": "dist/rich-text-vue.umd.js",
|
|
6
6
|
"module": "dist/rich-text-vue.esm.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"vue-class-component": "7.2.*",
|
|
25
25
|
"vue-property-decorator": "9.1.*"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "ac6a6374b42d111534189e0c8d4e3d1b52266b54"
|
|
28
28
|
}
|
package/types/RichText.d.ts
CHANGED
|
@@ -9,8 +9,10 @@ export default class ZdRichText extends ZdComponentRender {
|
|
|
9
9
|
outlined: boolean | string;
|
|
10
10
|
width: number | string;
|
|
11
11
|
height: number | string;
|
|
12
|
+
fillHeight: boolean;
|
|
12
13
|
extensions: Array<any>;
|
|
13
14
|
instance: RichText;
|
|
14
15
|
instanceType: typeof RichText;
|
|
15
16
|
onKeyDown(event: KeyboardEvent): void;
|
|
17
|
+
mounted(): void;
|
|
16
18
|
}
|