Skip to content

Commit

Permalink
very basic functionality
Browse files Browse the repository at this point in the history
just initializing the editor, noting more
  • Loading branch information
anasnakawa committed Sep 28, 2015
1 parent bcd22cd commit 8a58375
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
37 changes: 37 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "knockout-froala",
"version": "0.0.1",
"homepage": "https://github.com/anasnakawa/knockout-froala",
"authors": [
"Anas Nakawa <[email protected]>"
],
"description": "Knockout.js binding for Froala WYSIWYG HTML Rich Text Editor",
"main": "src/knockout-froala.js",
"moduleType": [
"globals"
],
"keywords": [
"knockout",
"froala",
"knockout.js",
"html",
"text",
"editor",
"wysiwyg",
"rich",
"editor",
"rich",
"text",
"editor",
"rte",
"javascript"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
23 changes: 23 additions & 0 deletions src/knockout-froala.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* knockout binding for Froala Editor
*/

(function( ko, $ ) { 'use strict';

/**
* binding definition
*/

ko.binidingHandlers.froalaEditor = {
init: function( element, value, bindings, viewModel, context ) {
var $el = $( element );
var options = ko.unwrapObservable( value() );

$el.froalaEditor( options );
},
update: function( element, value, bindings, viewModel, context ) {

}
}

})( window.ko, window.jQuery );

0 comments on commit 8a58375

Please sign in to comment.