lemonde / angular-ckeditor

CKEditor directive for Angular.
137 stars 133 forks source link

giving dynamic id from an angular object doesnt work #60

Open coolduebtn opened 8 years ago

coolduebtn commented 8 years ago

Hi, I have multiple instances of ckeditor in inline editing mode on the same page to whom I want to give different names with the id of my sections as shown below <div ckeditor="options" ng-model="section.content" contenteditable="true" id="sectioneditor-{{section.id}}"></div> However the section id is not replaced - I see the id of ckeditor as "sectioneditor-{{section.id}}" instead of "sectioneditor-1". The section object is already in the scope. What am I doing wrong ??

coolduebtn commented 7 years ago

Can anyone please help me on this ??

hotwer commented 7 years ago

I know you can't interpolate certain attributes this way.

Try this:

https://docs.angularjs.org/guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes