Skip to content

Commit 6613c9f

Browse files
committed
+ issue-54 Added standard style import for quilljs on doc
1 parent 1295529 commit 6613c9f

15 files changed

+112
-23968
lines changed

README.md

+46-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,52 @@ document.addEventListener('DOMContentLoaded', () => {
6464

6565
```
6666

67-
or
67+
Javascript 2 (Enable to Standard style for Quilljs)
68+
69+
```javascript
70+
import Quill from 'quill'
71+
import QuillMarkdown from '../src/app'
72+
73+
const toolbarOptions = [
74+
['bold', 'italic', 'underline', 'strike'],
75+
[ 'link', 'image'], // add's image support
76+
];
77+
78+
const options = {
79+
theme: 'snow',
80+
modules: {
81+
toolbar: toolbarOptions,
82+
QuillMarkdown: {
83+
ignoreTags: [ 'pre', 'strikethrough'], // @option - if you need to ignore some tags.
84+
85+
tags: { // @option if you need to change for trigger pattern for some tags.
86+
blockquote: {
87+
pattern: /^(\|){1,6}\s/g,
88+
},
89+
bold: {
90+
pattern: /^(\|){1,6}\s/g,
91+
},
92+
italic: {
93+
pattern: /(\_){1}(.+?)(?:\1){1}/g,
94+
},
95+
},
96+
}
97+
}
98+
}
99+
100+
document.addEventListener('DOMContentLoaded', () => {
101+
console.log('HOHO')
102+
103+
Quill.register('modules/QuillMarkdown', QuillMarkdown, true)
104+
105+
new Quill('#editor', options)
106+
})
107+
108+
```
109+
110+
111+
112+
HTML
68113

69114
```html
70115

0 commit comments

Comments
 (0)