vue-froala-wysiwyg icon indicating copy to clipboard operation
vue-froala-wysiwyg copied to clipboard

html.insert changes attribute order

Open phh opened this issue 5 years ago • 0 comments

I'm adding a custom button that has has the following callback: this.editor.html.insert('<div class="fr-deletable fr-video" contenteditable="false" data-type="all-video" data-id="2">test</div>', true);

However, it seems like the attributes are changing up: div class="fr-deletable fr-video" contenteditable="false" data-id="2" data-type="all-video" >test</div>

Instead of (data-id before data-type): <div class="fr-deletable fr-video" contenteditable="false" data-type="all-video" data-id="2">test</div>

It seems like this is only when the div contains any contents. The following will not change the attribute order: this.editor.html.insert('<div class="fr-deletable fr-video" contenteditable="false" data-type="all-video" data-id="2"></div>', true);

phh avatar Aug 26 '19 08:08 phh