Skip to content

Instantly share code, notes, and snippets.

@davidroyer
Created August 3, 2019 07:15
Show Gist options
  • Save davidroyer/4e4aa5180f3a3cc09637bd87901fa1de to your computer and use it in GitHub Desktop.
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.
<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