-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
just initializing the editor, noting more
- Loading branch information
1 parent
bcd22cd
commit 8a58375
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |