Ember-cli-summernote is an Ember CLI add-on. This addon actually converts summernote to an Ember component which is a re-usable unit. This is still a work in progress. Pull requests are welcome.
# install via npm
$ npm install ember-cli-summernote --save-dev
# make ember-cli fetch internal dependencies
$ ember g ember-cli-summernote
import Ember from 'ember';
export default Ember.ObjectController.extend({
contentHeight: 200,
postContent: "Some intial contents go here. Lorem Ipsum is simply dummy text of the printing.",
editingDisabled: false,
actions: {
changeHeight(someObject) {
var height = someObject.doSomeCalculationToGetHeight();
this.set('contentHeight', heigth)
}
}
});The bootstrap and fontAwesome resources will not be imported to your resources by default.
If you want the add-on to add it selectively you have to specify it in the Brocfile.js
(No option means false by default)
var app = new EmberAddon({
'ember-cli-summernote': {
"importBootstrapCSS": true,
"importBootstrapJS": true,
"importFontawesomeCSS": true
}
});
You can clone this repo and run the app
$ sudo npm install -g ember-cli
# clone the codebase
$ git clone http://github.com/vsymguysung/ember-cli-summernote.git
$ cd ember-cli-summernote
# install dependencies
$ npm install; bower install
# fire up local server
$ ember serve
# visit the page with the following url.
http://localhost:4200
-
Known issue: airMode is not working somehow.
-
Need to implement toolbar buttons customizing feature in the component.
-
Summernote(Super simple WYSIWYG Editor) (https://github.com/summernote/summernote)
-
Heather Brysiewicz's blog post (http://hbrysiewicz.github.io/2014-04-18-summernote-ember-wysiwyg.html)
MIT license.