Skip to main content

Adding a Text Editor

To add a new text editor, simply create a new component in the components/editor directory. The new component needs to implement the following functions to be compatible with the application:

  • focus is used to trigger the focus event on the editor.
  • readonly is used to put the editor in read-only mode.
  • undo is used to undo the content.
  • redo is used to redo the content.

Additionally, add a changeContent event to trigger the text change event on the text editor.

Finally, add the logic to display the editor in components/form/notes/index.vue. You may also need to modify the logic of the quick selection button for the editor in the toolbar of the text editor at components/toolbar/form-notes/index.vue.