Ember component wrapper for simditor editor
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
addon
app
config
tests
vendor
.bowerrc
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.npmignore
.travis.yml
.watchmanconfig
LICENSE.md
README.md
bower.json
build.sh
ember-cli-build.js
index.js
package-lock.json
package.json
testem.js
yarn.lock

README.md

Ember-cli-simditor

Build Status Downloads Version

Ember component wrapper for simditor.

Changes

0.0.7

Different from previous version, you must wrap content in object. See issue 6 for why.

Getting Started

Installation

In your ember-cli project, install this addon from npm

ember install ember-cli-simditor

or install the latest version from github

ember install git+https://github.com/wecatch/ember-cli-simditor

Usage

{{simditor-editor value=model update=(action (mut model.content)) editor=(mut editor) onValuechanged=(action "valuechanged") }}

You must wrap content in one object, that means model object must have one property called content for component to render, visit issue 6 for why.

By default the content property name is content, you can custome the property name with name argument

{{simditor-editor value=model update=(action (mut model.html)) editor=(mut editor) onValuechanged=(action "valuechanged") name='html' }}

Locale

English by default

{{simditor-editor update=(action (mut model.content)) editor=(mut editor) }}

Chinese

{{simditor-editor update=(action (mut model.content)) editor=(mut editor) locale='zh-CN' }}

API

In this addon , on prefix must be used for all events name. For sample, valuechanged => OnValuechanged.

  • valuechanged => onValuechanged
  • selectionchanged => onSelectionchanged
  • decorate => onDecorate
  • undecorate = > onUndecorate
  • pasting => onPasting
  • blur => onBlur
  • destroy => onDestroy

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server