vue quill editor
1.0.0
vue (2) 의 퀼 편집기 구성 요소.
불행히도, 퀼 프로젝트가 효과적으로 유지되는 것을 중단 했으므로 vue-quill-editor 더 이상 사용 되지 않으며 더 이상 VUE3을 지원하지 않습니다. 풍부한 텍스트 편집기를 찾고 있다면 Tiptap 으로 마이그레이션하는 것이 좋습니다. 이는 훨씬 더 나은 대안입니다.
Quill이 v2.0을 업데이트하면이 프로젝트도 계속 업데이트 될 것입니다. 나는 사람들 이이 저장소를 포크하도록 권장하며, 포크가 인기를 얻으면이 readme에서 그것에 연결할 것입니다.
정체 된 퀼 프로젝트는 다음과 같은 문제에서 찾을 수 있습니다.
NPM
npm install vue-quill-editor --saveyarn add vue-quill-editorcdn
< link rel =" stylesheet " href =" path/to/quill.core.css " />
< link rel =" stylesheet " href =" path/to/quill.snow.css " />
< link rel =" stylesheet " href =" path/to/quill.bubble.css " />
< script type =" text/javascript " src =" path/to/quill.js " > </ script >
< script type =" text/javascript " src =" path/to/vue.min.js " > </ script >
< script type =" text/javascript " src =" path/to/dist/vue-quill-editor.js " > </ script >
< script type =" text/javascript " >
Vue . use ( window . VueQuillEditor )
</ script >글로벌 구성 요소
import Vue from 'vue'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
Vue . use ( VueQuillEditor , /* { default global options } */ ) import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import { quillEditor } from 'vue-quill-editor'
export default {
components : {
quillEditor
}
}SSR 구성 요소
nuxt.js 예제 코드를 참조하십시오.
import Quill from 'quill'
import yourQuillModule from '../yourModulePath/yourQuillModule.js'
Quill . register ( 'modules/yourQuillModule' , yourQuillModule )
// Vue app...< template >
<!-- Two-way Data-Binding -->
< quill-editor
ref = " myQuillEditor "
v-model = " content "
:options = " editorOption "
@blur = " onEditorBlur($event) "
@focus = " onEditorFocus($event) "
@ready = " onEditorReady($event) "
/>
<!-- Or manually control the data synchronization -->
< quill-editor
:content = " content "
:options = " editorOption "
@change = " onEditorChange($event) "
/>
</ template >
< script >
// You can also register Quill modules in the component
import Quill from ' quill '
import someModule from ' ../yourModulePath/someQuillModule.js '
Quill . register ( ' modules/someModule ' , someModule)
export default {
data () {
return {
content : ' <h2>I am Example</h2> ' ,
editorOption : {
// Some Quill options...
}
}
},
methods : {
onEditorBlur ( quill ) {
console . log ( ' editor blur! ' , quill)
},
onEditorFocus ( quill ) {
console . log ( ' editor focus! ' , quill)
},
onEditorReady ( quill ) {
console . log ( ' editor ready! ' , quill)
},
onEditorChange ({ quill, html, text }) {
console . log ( ' editor change! ' , quill, html, text)
this . content = html
}
},
computed : {
editor () {
return this . $refs . myQuillEditor . quill
}
},
mounted () {
console . log ( ' this is current quill instance object ' , this . editor )
}
}
</ script >각 릴리스에 대한 자세한 변경 사항은 릴리스 노트에 문서화되어 있습니다.
MIT 라이센스에 따라 라이센스.