@zeedhi/zd-richtext-vue 1.1.3 → 1.2.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/README.md +74 -0
- package/dist/rich-text-vue.esm.js +5 -2
- package/dist/rich-text-vue.umd.js +8 -6
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Componente Rich Text para Zeedhi
|
|
2
|
+
O componente de Rich Text é um editor de texto enriquecido com algumas funcionalidades.
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
## Instalação
|
|
7
|
+
<code>npm i @zeedhi/zd-richtext</code>
|
|
8
|
+
Com isso, dois pacotes serão instalados: o **@zeedhi/zd-richtext-common** e o **@zeedhi/zd-richtext-vue**.
|
|
9
|
+
|
|
10
|
+
Após a instalação, é necessário que você você importe o pacote **@zeedhi/zd-richtext-vue** dentro de seu arquivo de configuração <code>zeedhi.ts</code>
|
|
11
|
+
```ts
|
|
12
|
+
import { ZdRichText } from '@zeedhi/zd-richtext';
|
|
13
|
+
|
|
14
|
+
Vue.component('ZdRichText', ZdRichText);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Já o pacote **@zeedhi/zd-rich-text-common** deve ser importado no arquivo <code>controller</code> do componente.
|
|
18
|
+
|
|
19
|
+
## Uso Básico
|
|
20
|
+
Para usar, defina a propriedade <code>component</code> como 'ZdRichText'.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"name": "rich-text-example",
|
|
25
|
+
"component": "ZdRichText"
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Propriedades
|
|
30
|
+
|
|
31
|
+
### outputFormat
|
|
32
|
+
<p>Tipo: <code>string</code></p>
|
|
33
|
+
<p>Default: <code>json</code></p>
|
|
34
|
+
<p>Descrição: Define o formato de saída do conteúdo digitado ('json' ou 'html')</p>
|
|
35
|
+
|
|
36
|
+
### placeholder
|
|
37
|
+
<p>Tipo: <code>string</code></p>
|
|
38
|
+
<p>Default: <code>''</code></p>
|
|
39
|
+
<p>Descrição: Texto mostrado enquanto o editor estiver sem conteúdo</p>
|
|
40
|
+
|
|
41
|
+
### disabled
|
|
42
|
+
<p>Tipo: <code>boolean</code></p>
|
|
43
|
+
<p>Default: <code>false</code></p>
|
|
44
|
+
<p>Descrição: Desabilita o componente</p>
|
|
45
|
+
|
|
46
|
+
### toolbarColor
|
|
47
|
+
<p>Tipo: <code>string</code></p>
|
|
48
|
+
<p>Default: <code>'#772583'</code></p>
|
|
49
|
+
<p>Descrição: Define a cor da barra de tarefas</p>
|
|
50
|
+
|
|
51
|
+
### cardColor
|
|
52
|
+
<p>Tipo: <code>string</code></p>
|
|
53
|
+
<p>Default: <code>''</code></p>
|
|
54
|
+
<p>Descrição: Define a cor do cartão de entrada de texto</p>
|
|
55
|
+
|
|
56
|
+
### outlined
|
|
57
|
+
<p>Tipo: <code>boolean</code></p>
|
|
58
|
+
<p>Default: <code>false</code></p>
|
|
59
|
+
<p>Descrição: Remove a elevação e adiciona uma borda fina ao cartão de entrada de texto</p>
|
|
60
|
+
|
|
61
|
+
### width
|
|
62
|
+
<p>Tipo: <code>number | string</code></p>
|
|
63
|
+
<p>Default: <code>''</code></p>
|
|
64
|
+
<p>Descrição: Define a largura do componente</p>
|
|
65
|
+
|
|
66
|
+
### height
|
|
67
|
+
<p>Tipo: <code>number | string</code></p>
|
|
68
|
+
<p>Default: <code>''</code></p>
|
|
69
|
+
<p>Descrição: Define a altura do componente</p>
|
|
70
|
+
|
|
71
|
+
## Eventos
|
|
72
|
+
<p>Nome: <code>onKeyDown</code></p>
|
|
73
|
+
<p><code>{ element, component, key, content }: IEventParam</code></p>
|
|
74
|
+
<p>Descrição: Disparado quando uma tecla é digitada no editor</p>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
+
import { VersionService } from '@zeedhi/core';
|
|
2
3
|
import { PropWatch, ZdComponentRender, Vuetify } from '@zeedhi/vuetify';
|
|
3
4
|
import { Component } from 'vue-property-decorator';
|
|
4
5
|
import { RichText } from '@zeedhi/zd-richtext-common';
|
|
@@ -268,7 +269,7 @@ __vue_render__._withStripped = true;
|
|
|
268
269
|
/* style */
|
|
269
270
|
const __vue_inject_styles__ = function (inject) {
|
|
270
271
|
if (!inject) return
|
|
271
|
-
inject("data-v-
|
|
272
|
+
inject("data-v-354eed49_0", { source: ".zd-rich-text button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\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__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 });
|
|
272
273
|
|
|
273
274
|
};
|
|
274
275
|
/* scoped */
|
|
@@ -302,6 +303,8 @@ Vue.use(TiptapVuetify.TiptapVuetifyPlugin, {
|
|
|
302
303
|
vuetify: new Vuetify(),
|
|
303
304
|
iconsGroup: 'mdi',
|
|
304
305
|
});
|
|
305
|
-
Vue.component('tiptap-vuetify', TiptapVuetify.TiptapVuetify);
|
|
306
|
+
Vue.component('tiptap-vuetify', TiptapVuetify.TiptapVuetify);
|
|
307
|
+
const packageContent = require('../package.json');
|
|
308
|
+
VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
306
309
|
|
|
307
310
|
export { __vue_component__ as ZdRichText };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@zeedhi/vuetify'), require('vue-property-decorator'), require('@zeedhi/zd-richtext-common'), require('tiptap-vuetify/dist/main.css')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@zeedhi/vuetify', 'vue-property-decorator', '@zeedhi/zd-richtext-common', 'tiptap-vuetify/dist/main.css'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-richtext-vue"] = {}, global.vue, global["@zeedhi/vuetify"], global["vue-property-decorator"], global["@zeedhi/zd-richtext-common"]));
|
|
5
|
-
})(this, (function (exports, Vue, vuetify, vuePropertyDecorator, zdRichtextCommon) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@zeedhi/core'), require('@zeedhi/vuetify'), require('vue-property-decorator'), require('@zeedhi/zd-richtext-common'), require('tiptap-vuetify/dist/main.css')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@zeedhi/core', '@zeedhi/vuetify', 'vue-property-decorator', '@zeedhi/zd-richtext-common', 'tiptap-vuetify/dist/main.css'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-richtext-vue"] = {}, global.vue, global.core, global["@zeedhi/vuetify"], global["vue-property-decorator"], global["@zeedhi/zd-richtext-common"]));
|
|
5
|
+
})(this, (function (exports, Vue, core, vuetify, vuePropertyDecorator, zdRichtextCommon) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
/* style */
|
|
273
273
|
const __vue_inject_styles__ = function (inject) {
|
|
274
274
|
if (!inject) return
|
|
275
|
-
inject("data-v-
|
|
275
|
+
inject("data-v-354eed49_0", { source: ".zd-rich-text button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\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__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 });
|
|
276
276
|
|
|
277
277
|
};
|
|
278
278
|
/* scoped */
|
|
@@ -306,7 +306,9 @@
|
|
|
306
306
|
vuetify: new vuetify.Vuetify(),
|
|
307
307
|
iconsGroup: 'mdi',
|
|
308
308
|
});
|
|
309
|
-
Vue__default["default"].component('tiptap-vuetify', TiptapVuetify.TiptapVuetify);
|
|
309
|
+
Vue__default["default"].component('tiptap-vuetify', TiptapVuetify.TiptapVuetify);
|
|
310
|
+
const packageContent = require('../package.json');
|
|
311
|
+
core.VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
310
312
|
|
|
311
313
|
exports.ZdRichText = __vue_component__;
|
|
312
314
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/zd-richtext-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.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",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"vue-class-component": "^7.2.6",
|
|
24
24
|
"vue-property-decorator": "^9.1.2"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "e4e4e252e4ea83919f14a67364af75edbfdc5686"
|
|
27
27
|
}
|