@dreamworld/dw-text-editor
v3.0.0
Published
A light-weight Rich Text Editor based on Squire, built as LitElement WebComponent
Downloads
209
Keywords
Readme
dw-text-editor
Introduction
- HTML5 rich text editor
Installation Steps
npm i @dw/dw-text-editor- Copy the
squire.htmlfile into your server root directory.
Usage
Import
import '@dw/dw-text-editor'
Use
Set
iframePathattribute topath/to/squire.htmlifsquire.htmlfile isn't on root directory.Set
autoHeightto avoid iframe scroll. In this case iframe has same height as its content always.Set
readOnlyto mark content as read only and hide toolbar action manu.Set
autoFocusto set focus into iFrame body when iFrame is ready.Set
proxy-eventsto proxy events from editor content.- Note: Original event can be accessed through
e.details.evente.g(e) => {const originalEvent = e.details.event}
- Note: Original event can be accessed through
<dw-text-editor iframePath="path/to/squire.html" value="" autoHeight readOnly> </dw-text-editor>
