I male website where user can make website profile. How can user from mywebsite can custom text and styling like make bold, coloring,etc ?
You need to use good wysiwyg editor like https://github.com/scrumpy/tiptap
you can do the basic setup like this
<template>
<editor-content :editor="editor" />
</template>
<script>
// Import the editor
import { Editor, EditorContent } from 'tiptap'
export default {
components: {
EditorContent,
},
data() {
return {
editor: null,
}
},
mounted() {
this.editor = new Editor({
content: '<p>This is just a boring paragraph</p>',
})
},
beforeDestroy() {
this.editor.destroy()
},
}
</script>
coloring
as a feature, you'd either have to extend it or use a different package, of course manually coding it is always an option. You may want to keep in mind that escaping user input is extremely important in this case. An easy way to get started, for example, is by globally replacing tags with html elements using regex. – John Doe Nov 11 '19 at 5:18