Weird behavour wysiwyg?
问题 I have a code to wrap elements around text it works fine until i try the following format in my editor: <u><strong>T</strong>es<strong>t</strong></u> It automatic adds two empty strong elements before the underlined element and after like this: <strong></strong> <u><strong>T</strong>es<strong>t</strong></u> <strong></strong> Here's the code that i use and i have buttons that have actions like wrap('strong'): function wrap(tagName) { var selection; var elements = []; var ranges = []; var