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- Related
- Theme previews
Installation
- npm
- Yarn
npm install @rcarls/rc-markdown-editor
yarn add @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
| Property | Markup | Type | Default | Description |
|---|---|---|---|---|
defaultValue | default-value | string | Not specified | No description provided. |
value | JS property only | string | Not specified | No description provided. |
defaultSourceMode | default-source-mode | boolean | Not specified | No description provided. |
sourceMode | source-mode | boolean | Not specified | No description provided. |
toolbar | toolbar | boolean | true | Show the formatting toolbar. |
readOnly | read-only | boolean | false | Make the editor read-only. |
Methods
No public methods are documented in the custom elements manifest.
Events
| Event | Detail type | Description |
|---|---|---|
rc-formatting-change | CustomEvent | Active formats at cursor changed. Detail: `ActiveFormats`. |
rc-change | CustomEvent | Value changed. Detail: `{ value: string }`. |
rc-mode-change | CustomEvent | Mode 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.