ui-tinymce icon indicating copy to clipboard operation
ui-tinymce copied to clipboard

Doesn't work if ID exists in TEXTAREA tag

Open chrispcb opened this issue 7 years ago • 1 comments

Ex:

<label for="text">Message</label>
<textarea ui-tinymce ng-model="mymodel" name="text" id="text"></textarea>

Fixe:

if (!attrs.id) {
    var uniqueId = uiTinymceService.getUniqueId();
    attrs.$set('id', uniqueId);
}

chrispcb avatar May 11 '17 08:05 chrispcb

Hi,

I don't contribute to this project but in README: Be sure not to set an id attribute. This is because the directive needs to maintain selector knowledge in order to handle buggy behavior in TinyMCE when DOM manipulation is involved, such as in a reordering of HTML through ng-repeat or DOM destruction/recreation through ng-if. Maybe more complicated?

DarkIsDude avatar May 15 '17 12:05 DarkIsDude