Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-tui-editor

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-tui-editor

TOAST UI WYSIWYG markdown editor for Ember.

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

npm version

ember-tui-editor

TOAST UI WYSIWYG markdown editor for Ember. (Demo)

Compatibility

  • Ember.js v3.28 or above
  • Ember CLI v4.12 or above
  • Node.js v18 or above

Installation

ember install ember-tui-editor

Usage

<TuiEditor @value='# Hello World' @onChange={{this.onChange}} />

Properties

For a list of possible options and their defaults have a look at the TOAST UI docs.

You can pass the properties as a hash to options using their original names just as you would when using TUI editor directly. Alternatively set them directly on the component. The later version has the advantage that some properties are bound. However mind the different naming (see table).

The following table lists some special properties (bound, different name) only:

PropertyTUI nameIs Bound?Notes
heightx
minHeightx
valueinitialValuexChanges do not propagate to value ("data down, action up")
previewStylex
editTypeinitialEditTypex
viewerDo not show editor but markdown viewer only
languageThis loads the appropriate locale file automatically

Actions

EventDescription
onLoadEmitted when editor is fully loaded
onChangeEmitted when content changed
onCaretChangeEmitted when format changed by cursor position
onFocusEmitted when editor gets focus
onBlurEmitted when editor looses focus

i18n

Based on the @language argument you pass in, ember-tui-editor will automatically load the corresponding locale file.

For a list of all available locales check here.

Plugins

A list of plugins can be passed to @plugins (just as they would be passed to vanilla TOAST UI editor). Import is not handled by this addon and has to happen in app.

import chart from '@toast-ui/editor-plugin-chart';

export default MyComponent extends Component {
  // ...
  editorPlugins = [chart];
  //..
}
<TuiEditor
  @value='# Hello World'
  @onChange={{this.onChange}}
  @plugins={{this.editorPlugins}}
/>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 16 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc