Search code examples
javascriptjqueryhtmlkendo-uikendo-editor

Kendo (WYSIWYG) Editor doesn`t send <form> tag


I use Kendo Editor on my website, but I have problem. I want to fill in embedded form code from MailChimp but Editor remove the form tag. I don't know how should I make it work. I have read a documentation but there is no solution. Thanks for advice


Solution

  • Kendo will automatically decode the html tag inside. Thus you need to encode the value of editor. Please check this fiddle: http://jsfiddle.net/5eav9/

    Try to put this value in the editor:

    <form><p>Hello world!!</p></form>
    

    Then click the button, you will get:

    &lt;form&gt;&lt;p&gt;Hello world!!&lt;/p&gt;&lt;/form&gt;
    

    then, call encode function,

    Encoder.htmlDecode(editor.value())
    

    you will get:

    <form><p>Hello world!!</p></form>
    

    Note: I used external js http://www.strictly-software.com/scripts/downloads/encoder.js to encode the html tag.