jeudi 6 mars 2014

Undo functionality is not working for br tag in Rich Text Editor in CQ


Vote count:

0




We have customized a button which add "br" tag at the cursor position in Rich Text Editor in CQ


How we are achieving this is - by creating element by calling Document.createElement("br") and then appending this element as child node of a parent node.


Now whenever we are adding this "br" (by clicking on button) and then after performing some minor think like writing text or making text bold if we click on Undo button then undo is not working properly as expected. If we do not use "br" tag then everything is working fine.


I think issue is we are calling document.createElement for our tag,since createElement creates a element with opening and closing tag while "br" is a empty tag. so may this is the issue. If this is the issue you guys think then please tell me what is the alternative of createElement for empty tag.


Please give suggestion urgently.


Please help.


Thanks



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire