Socket
Socket
Sign inDemoInstall

ember-tui-editor

Package Overview
Dependencies
8
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-tui-editor

TOAST UI WYSIWYG markdown editor for Ember.


Version published
Weekly downloads
156
increased by69.57%
Maintainers
2
Install size
78.6 MB
Created
Weekly downloads
 

Changelog

Source

[3.0.10] - 2023-07-24

Fixed

  • Fix embroider compatibility (#495)

Readme

Source

npm version

ember-tui-editor

TOAST UI WYSIWYG markdown editor for Ember. (Demo)

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 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

Last updated on 24 Jul 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc