WYSIWYG
Description
WYSIWYG field for Enso UI, with TinyMCE as the default editor and optional Trix support.
Installation
Install the package:
yarn add @enso-ui/wysiwyg
Features
- exports
Wysiwygas its public surface - supports
tinymceandtrixeditor engines - keeps TinyMCE as the default editor for backward compatibility
- keeps the Bulma presentation layer separate from the renderless/stateful layer where applicable
Usage
<script setup>
import Wysiwyg from '@enso-ui/wysiwyg/bulma';
</script>
<Wysiwyg v-model="content"
:has-error="false"/>
<Wysiwyg v-model="content"
editor="trix"
:has-error="false"/>
API
Wysiwyg
Public export available from src/bulma/Wysiwyg.vue.
Props:
hasErroreditormenubarpluginstoolbar
editor defaults to tinymce. Set it to trix to use the Trix editor.
Trix
Trix uses the same v-model contract as TinyMCE:
<Wysiwyg v-model="content"
editor="trix"
:has-error="false"/>
Form renderers may pass this through backend metadata as meta.editor: 'trix'.
Changelog
See CHANGELOG.md.
Depends On
- No additional Enso UI package dependencies.
trix
Contributions
are welcome. Pull requests are great, but issues are good too. Thank you to all the people who already contributed to Enso!