Hello,
I am having some trouble using custom callbacks for PasteCleanup, Deserialization or Serialization. Whatever input string I give as the custom callback, be it a function name or declaration, just gets double quoted in the editor configuration javascript that is generated and is then seemly ignored. Unlike how setting an event callback works.
How do I setup an editor to use these features?
Sample code:
@(Html.Kendo().Editor() .Name("bloop") .PasteCleanup(e => e.Custom("onPaste")) .Deserialization(e => e.Custom("onDeserialization")) .Serialization(e => e.Custom("onSerialization")) .Events(e => e.Change("onChange")))<script type="text/javascript"> function onPaste(html) { console.log('onPaste'); return html; } function onSerialization(html) { console.log('onSerialization'); return html; } function onDeserialization(html) { console.log('onDeserialization'); return html; } function onChange() { console.log('onChange'); }</script>
Using that above code Html.Kendo().Editor() is generating the following javascript when it executes:
jQuery(function(){jQuery("#bloop").kendoEditor({"change":onChange,"deserialization":{"custom":"onDeserialization"},"pasteCleanup":{"custom":"onPaste"},"serialization":{"custom":"onSerialization"},"tools":[{"name":"formatting"},{"name":"bold"},{"name":"italic"},{"name":"underline"},{"name":"justifyLeft"},{"name":"justifyCenter"},{"name":"justifyRight"},{"name":"insertUnorderedList"},{"name":"insertOrderedList"},{"name":"outdent"},{"name":"indent"},{"name":"createLink"},{"name":"unlink"},{"name":"insertImage"},{"name":"createTable"},{"name":"addColumnLeft"},{"name":"addColumnRight"},{"name":"addRowAbove"},{"name":"addRowBelow"},{"name":"deleteRow"},{"name":"deleteColumn"}]});});Note how onDeserialization is double quoted where onChange is not.
Using R2 2016 SP2 (2016.2.714) with MVC4.
Thank you
