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', height)
}
}
});
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
- Need to implement airPopover 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.