Created
August 3, 2019 07:15
-
-
Save davidroyer/4e4aa5180f3a3cc09637bd87901fa1de to your computer and use it in GitHub Desktop.
Example of how to customize Quill.js so it uses inline styles to format the editor content instead of its default way of using classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<VueEditor v-model="content" /> | |
</template> | |
<script> | |
import { VueEditor } from "vue2-editor"; | |
import Quill from "quill"; | |
const AlignStyle = Quill.import("attributors/style/align"); | |
Quill.register(AlignStyle, true); | |
export default { | |
components: { VueEditor }, | |
data() { | |
return { | |
content: "" | |
}; | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment