This file contains hidden or 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
/** | |
* Correct version of a wysihtml5 binding for KnockoutJS that is safe for multiple inclusion on a single page | |
*/ | |
ko.bindingHandlers.wysihtml5 = { | |
init: function (element, valueAccessor, allBindingsAccessor, viewModel) { | |
var control = $(element).wysihtml5({ | |
"events": { | |
"change" : function() { | |
var observable = valueAccessor(); | |
observable(control.getValue()); |