Skip to main content

rc-markdown-editor

Rich/source Markdown editor with a formatting toolbar, backed by rc-textarea.

Package
@rcarls/rc-markdown-editor
Element
<rc-markdown-editor>
Native dependency
Requires a textarea child
State model
Native textarea value plus editor mode
Main events
rc-formatting-changerc-changerc-mode-change

Installation

npm install @rcarls/rc-markdown-editor
import '@rcarls/rc-markdown-editor/define';

Live demo

Theming

The default demo mode shows the component without a package theme. Use the shared preview controls on this page to compare inherited, light, and dark color schemes or to apply the optional Material theme only inside the demo frames.

API

Properties

PropertyMarkupTypeDefaultDescription
defaultValuedefault-valuestringNot specifiedNo description provided.
valueJS property onlystringNot specifiedNo description provided.
defaultSourceModedefault-source-modebooleanNot specifiedNo description provided.
sourceModesource-modebooleanNot specifiedNo description provided.
toolbartoolbarbooleantrueShow the formatting toolbar.
readOnlyread-onlybooleanfalseMake the editor read-only.

Methods

No public methods are documented in the custom elements manifest.

Events

EventDetail typeDescription
rc-formatting-changeCustomEventActive formats at cursor changed. Detail: `ActiveFormats`.
rc-changeCustomEventValue changed. Detail: `{ value: string }`.
rc-mode-changeCustomEventMode toggled. Detail: `{ mode: EditorMode }`.

Slots

No slots are documented in the custom elements manifest.

CSS Custom Properties

No CSS custom properties are documented in the custom elements manifest.

CSS Parts

No CSS parts are documented in the custom elements manifest.