surmon-china / vue-quill-editor

@quilljs editor component for @vuejs(2)
https://github.surmon.me/vue-quill-editor
MIT License
7.39k stars 1.03k forks source link

Multiple instances. Instance name as parameter. Dynamic name. #79

Closed mikeevstropov closed 7 years ago

mikeevstropov commented 7 years ago

Hi! How to pass instance name dynamically like:

<div v-quill="editorOption" instanceName="myEditor"></div>

Thank you!

surmon-china commented 7 years ago

The v2.3.2 will be support.

surmon-china commented 7 years ago

https://github.com/surmon-china/vue-quill-editor/blob/master/ssr.js#L6

  1. binding.arg
<div v-quill:myEditor="editorOption"></div>
  1. vnode.data.attrs.instanceName
<div v-quill="editorOption" :instanceName="myEditorDynamicName"></div>
  1. element id
<div v-quill="editorOption" id="myEditor"></div>
  1. default when empty (this default instance name is "quill")
<div v-quill="editorOption"></div>