Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Doesn't work if ID exists in TEXTAREA tag #332

Open
chrispcb opened this issue May 11, 2017 · 1 comment
Open

Doesn't work if ID exists in TEXTAREA tag #332

chrispcb opened this issue May 11, 2017 · 1 comment

Comments

@chrispcb
Copy link

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);
}
@DarkIsDude
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants