immense / knockout-tinymce

TinyMCE binding for Knockout.js
http://rawgit.com/immense/knockout-tinymce/master/demo.html
MIT License
6 stars 4 forks source link

Fixes an issue with using inline-tinymce #2

Closed Manuel-S closed 8 years ago

Manuel-S commented 8 years ago

when using tinymce with the option inline: true, it can be used on any html element. In that case, the binding must set the html instead of text-value of that element.

I tried to update the coffee source this time, js needs to be generated.

Manuel-S commented 8 years ago

have you looked at this yet?

Manuel-S commented 8 years ago

I fixed the coffeescript and regenerated the javascript.

cmbankester commented 8 years ago

@Manuel-S Cool, thanks! Sorry I never got back to you originally. Do you have a small demo case where this fix might be used, i.e. some code or perhaps a gif?

Manuel-S commented 8 years ago

easy:

<div data-bind="tinymce: vmProperty, tinymceConfig: { inline: true }"></div> 

if you do this without the fix, all the html in vmProperty will be escaped on init.

cmbankester commented 8 years ago

@Manuel-S Looks good. I'll merge it in and recompile (to produce the knockout-tinymce.min.js file). Thanks for your work!

Manuel-S commented 8 years ago

I did that but go ahead :)

cmbankester commented 8 years ago

Oh good, I didn't even see that! Awesome, you rock