开发者

(Jquery-Rich Text Editor) How can be fixed bug in rich text editor - when press enter in firefox created 'br' tag but in IE created 'p' tag?

I working on website that use cleditor (Jquery-Rich Text Editor). The editor have bug - when press enter after letter in firefox created 'br' tag开发者_如何学Go but in IE created 'p' tag.

Bug reproduction: You can see this in their demo http://premiumsoftware.net/cleditor/ (enter some input end press enter (Firefox + IE ) - see different space between lines because in IE generated 'p' tag vs firefox that genarated 'br' tag)

Update:

same question - better explanation then my: http://vanillaforums.org/discussion/13627/ie-uses-paragraph-tags-firefox-uses-br-tags/p1

please help me, what should i change for create 'br' tag also in IE instead 'p' tag.

Thanks, Yosef


It is not a bug. CLEditor uses standart browser api which can produce different result in different browsers and you cannot change IE behaviour but you can disable "br" generation in Mozilla by using execCommand

$("#input").cleditor()[0].doc.execCommand("insertBrOnReturn", false, false);

But content should have at least one paragraph. Only in this case firefox will generate "p".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜