0.1.5 • Published 1 year ago

ember-ink-mde v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ember-ink-mde

NPM Version CI Status Code Climate MIT License

An Ember.js addon for the Ink Markdown Editor

Compatibility

  • Ember.js v3.24 or above
  • Ember CLI v3.24 or above
  • Node.js v14 or above

Requirements

Ember will throw an error if this requirement is not met.

Installation

ember install ember-ink-mde

Usage

Ink Options

The configuration options match most of the configuation from ink-mde.

  • doc
  • beforeUpdate
  • afterUpdate
  • vim

Nested options are prefixed with their top-level configuration key so they can be specified as properties on an Ember component:

interfacetoolbar
interfaceAttributiontoolbarBold
interfaceAutocompletetoolbarCode
interfaceImagestoolbarCodeBlock
interfaceReadonlytoolbarHeading
interfaceSpellchecktoolbarImage
interfaceToolbartoolbarItalic
toolbarLink
toolbarList
toolbarOrderedList
toolbarQuote
toolbarTaskList
toolbarUpload

Note: The plugin does not yet support configuring the file options. Pull requests are welcomed.

<!-- my-component.hbs -->

{{ink-mde
  doc="my awesome markdown content"
  afterUpdate=(action afterEditorUpdate)
}}

Other Options

The plugin also supports an onEditorReady function, which provides the ink editor object. For example,

<!-- my-component.hbs -->

{{ink-mde
  onEditorReady=(action 'onEditorReady')
}}
//my-component.js

@action
onEditorReady(editor) {
  this.editor = editor;
}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.