@adminforth/rich-editor 1.0.2 → 1.0.3
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/custom/quillEditor.vue +27 -3
- package/dist/custom/quillEditor.vue +27 -3
- package/package.json +2 -2
- package/types.ts +27 -0
package/custom/quillEditor.vue
CHANGED
|
@@ -86,6 +86,30 @@ onMounted(() => {
|
|
|
86
86
|
placeholder: 'Type here...',
|
|
87
87
|
// formats : ['complete'],
|
|
88
88
|
modules: {
|
|
89
|
+
toolbar: props.meta.toolbar || [
|
|
90
|
+
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
91
|
+
['blockquote', 'code-block', 'link'],
|
|
92
|
+
// [
|
|
93
|
+
// // 'image',
|
|
94
|
+
// // 'video',
|
|
95
|
+
// // 'formula'
|
|
96
|
+
// ],
|
|
97
|
+
|
|
98
|
+
[{ 'header': 2 }, { 'header': 3 }], // custom button values
|
|
99
|
+
[{ 'list': 'ordered'}, { 'list': 'bullet' }, { 'list': 'check' }],
|
|
100
|
+
// [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
|
|
101
|
+
// [{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
|
|
102
|
+
// [{ 'direction': 'rtl' }], // text direction
|
|
103
|
+
|
|
104
|
+
// [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
105
|
+
// [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
106
|
+
|
|
107
|
+
// [{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
|
|
108
|
+
// [{ 'font': [] }],
|
|
109
|
+
[{ 'align': [] }],
|
|
110
|
+
|
|
111
|
+
['clean'] // remove formatting button
|
|
112
|
+
],
|
|
89
113
|
keyboard: {
|
|
90
114
|
bindings: {
|
|
91
115
|
tab: {
|
|
@@ -377,9 +401,9 @@ function removeCompletionOnBlur() {
|
|
|
377
401
|
display: inline;
|
|
378
402
|
}
|
|
379
403
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
404
|
+
.ql-editor:not(:focus) [completer] {
|
|
405
|
+
display: none;
|
|
406
|
+
}
|
|
383
407
|
|
|
384
408
|
.ql-editor [completer] {
|
|
385
409
|
// important to keep pointer-events non none for cursor position on completer click
|
|
@@ -86,6 +86,30 @@ onMounted(() => {
|
|
|
86
86
|
placeholder: 'Type here...',
|
|
87
87
|
// formats : ['complete'],
|
|
88
88
|
modules: {
|
|
89
|
+
toolbar: props.meta.toolbar || [
|
|
90
|
+
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
91
|
+
['blockquote', 'code-block', 'link'],
|
|
92
|
+
// [
|
|
93
|
+
// // 'image',
|
|
94
|
+
// // 'video',
|
|
95
|
+
// // 'formula'
|
|
96
|
+
// ],
|
|
97
|
+
|
|
98
|
+
[{ 'header': 2 }, { 'header': 3 }], // custom button values
|
|
99
|
+
[{ 'list': 'ordered'}, { 'list': 'bullet' }, { 'list': 'check' }],
|
|
100
|
+
// [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
|
|
101
|
+
// [{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
|
|
102
|
+
// [{ 'direction': 'rtl' }], // text direction
|
|
103
|
+
|
|
104
|
+
// [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
105
|
+
// [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
106
|
+
|
|
107
|
+
// [{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
|
|
108
|
+
// [{ 'font': [] }],
|
|
109
|
+
[{ 'align': [] }],
|
|
110
|
+
|
|
111
|
+
['clean'] // remove formatting button
|
|
112
|
+
],
|
|
89
113
|
keyboard: {
|
|
90
114
|
bindings: {
|
|
91
115
|
tab: {
|
|
@@ -377,9 +401,9 @@ function removeCompletionOnBlur() {
|
|
|
377
401
|
display: inline;
|
|
378
402
|
}
|
|
379
403
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
404
|
+
.ql-editor:not(:focus) [completer] {
|
|
405
|
+
display: none;
|
|
406
|
+
}
|
|
383
407
|
|
|
384
408
|
.ql-editor [completer] {
|
|
385
409
|
// important to keep pointer-events non none for cursor position on completer click
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/rich-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"rollout": "tsc &&
|
|
9
|
+
"rollout": "tsc && rsync -av --exclude 'node_modules' custom dist/ && npm version patch && npm publish --access public",
|
|
10
10
|
"prepare": "npm link adminforth"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [],
|
package/types.ts
CHANGED
|
@@ -20,6 +20,33 @@ export interface PluginOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
htmlFieldName: string;
|
|
22
22
|
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Quill toolbar setting, full toolbar:
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
* [
|
|
29
|
+
* ['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
30
|
+
* ['blockquote', 'code-block', 'link'],
|
|
31
|
+
* // [ 'image', 'video', 'formula' ],
|
|
32
|
+
*
|
|
33
|
+
* [{ 'header': 2 }, { 'header': 3 }], // custom button values
|
|
34
|
+
* [{ 'list': 'ordered'}, { 'list': 'bullet' }, { 'list': 'check' }],
|
|
35
|
+
* // [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
|
|
36
|
+
* // [{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
|
|
37
|
+
* // [{ 'direction': 'rtl' }], // text direction
|
|
38
|
+
* // [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
39
|
+
* // [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
40
|
+
* // [{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
|
|
41
|
+
* // [{ 'font': [] }],
|
|
42
|
+
* [{ 'align': [] }],
|
|
43
|
+
*
|
|
44
|
+
* ['clean']
|
|
45
|
+
* ]
|
|
46
|
+
*```
|
|
47
|
+
*/
|
|
48
|
+
toolbar?: any[];
|
|
49
|
+
|
|
23
50
|
/**
|
|
24
51
|
* The completion section is used to define the completion provider and its parameters.
|
|
25
52
|
*/
|