开发者

How to save <FORM> tag inside <TEXTAREA> using rich-text editor like FCKeditor or NicEditor

开发者 https://www.devze.com 2022-12-19 21:42 出处:网络
I am using a rich text editor and in HTML mode, I want to put a FORM tag within my code. However, when I save, thetag disappears. I guess you cant have a FORM in the code within the FORM.

I am using a rich text editor and in HTML mode, I want to put a FORM tag within my code. However, when I save, the tag disappears. I guess you cant have a FORM in the code within the FORM.

So I think what's happening is this:

<form name="form">
<textarea><form>开发者_JAVA百科;<input type="text"></form></textarea>
<input type="submit" value="submit">
</form>

Is there anyway I can use javascript (I am using jQuery) to serialize it or other ways of getting it to save with FORM tag in my editor content?

Thanks!


I think this is getting prevented by the browser's rendering engine (or the RTE's validation).

You could use a different tag for the inner form <farm> and to replace it on the fly on the save event of the editor.

But what do you need a nested form for in the first place?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号