angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 371 forks source link

Prevent duplicate ID's #293

Closed roelplieger closed 7 years ago

roelplieger commented 7 years ago

We had a situation where we had multiple inline editors on screen. This resulted in a problem because some unique ID's were created in the same millisecond so they were not unique. I solved this by creating a small service that creates the unique ID's by using a counter. Because the service is a singleton this will ensure a unique ID even when using multiple directives at the same time.

Cheers, Roel Plieger.

deeg commented 7 years ago

Could you please squash this to one commit?