Knockout Froala WYSIWYG HTML Editor
Knockout.js binding for Froala WYSIWYG HTML Rich Text Editor ( Version 2 )
Install
using Bower
bower install knockout-froala
using npm
npm install knockout-froala
Usage
to enable Froala binding on a textarea, you need to provide the following binding handlers
froala
: the model observable behind the editorfroalaOptions
: a plain object or an observable that will hold all the options to initalize the editorfroalaInstance
: [ optional ] if provided, froala instance will be stored in this observable once initialized ( should be observable )
var viewModel = {
comments: ko.observable(),
options: {
enter: $.FroalaEditor.ENTER_DIV,
theme: 'gray',
toolbarButtons: [ 'bold', 'italic', 'underline' ]
}
}
ko.applyBindings( viewModel );
Using a <textarea>
<textarea data-bind="value: comments, froala: comments, froalaOptions: options"></textarea>
or a <div>
<div data-bind="froala: comments, froalaOptions: options"></div>
License
The knockout-froala
project is under MIT license. However, in order to use Froala WYSIWYG HTML Editor plugin you should purchase a license for it.
Froala Editor has 3 different licenses for commercial use.
For details please see License Agreement.