knockout.js how to init tinymce? -


i trying integrate timymce knockout, idea is, when click on link, show content non-editable, click on test edit open tinymce. , create button save , switch edit model view model. here sample code , tinymce didn't work now... help.

and how should debug knockout?

sample code here: http://jsfiddle.net/princa/zadek/3/ 

1) need these bindings bind tinymce knockout model. https://github.com/stevesanderson/knockout/wiki/bindings---tinymce

2) html textareas , display areas.

<a href="javascript:void(0)" data-bind="click:function(){showeditor(true)}">show editor</a> |  <a href="javascript:void(0)" data-bind="click:function(){showeditor(false)}">hide editor</a> <br/>  <div data-bind="text: fieldone, visible:!showeditor()"></div>  <div data-bind="css:{'nodisplay':!showeditor()}">     <textarea class="tinymce" data-bind="tinymce: fieldone"></textarea> </div>  <hr/>  <h2>debug</h2> <div data-bind="text: ko.tojson(viewmodel)"></div> 

3) js

var viewmodel = {     fieldone: ko.observable("one"),     showeditor:ko.observable(false) };  ko.applybindings(viewmodel); 

you can check jsfiddle out. http://jsfiddle.net/billaraw/kwprv/


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -