- Home
- Forum
- JavaScript - EJ 2
- ContentControl editing
ContentControl editing
I am absolutely desperate trying to make this work. The API seems to be faulty.
If I editor.exportContentControlData() > canEdit and canDelete will be FALSE but actually they are TRUE since I CAN delete and edit. Thats the first Problem
Second Problem is that in 3 days I have not managed to edit via API a single propery in one of the controls - it will ALWAYS overwrite ALL of them.
Third Problem is that if I import Via API it will always ignore my canEdit and canDelete values... so i am stuck with the default way which is without tags and without id.
>> every id = same > every value is updated - at least thats what I suspect.
When reverse engineereing the API i see that you can only adress via title / type combination - BUT you cannot insert with title-
what am I missing ?
Thanks so muc
Hi Nico Chiaro,
| If I editor.exportContentControlData() > canEdit and canDelete will be FALSE but actually they are TRUE since I CAN delete and edit. Thats the first Problem | In Document Editor, we have maintained
We have attached a sample and video for your reference. | |
| Second Problem is that I have not yet managed to edit via API a single property in one of the controls - it will ALWAYS overwrite ALL of them. | You can use the getContentControlInfo API to get information about the selected content control, and you can modify the values of the properties and set them using setContentControlInfo.
We have attached a sample and video for your reference. Sample: https://stackblitz.com/edit/vmvp1ric-sgtj41sq?file=index.ts,index.html,data-default.json | |
| Third Problem is that if I import Via API it will always ignore my canEdit and canDelete values... so i am stuck with the default way which is without tags and without id. | The importContentControlData, will only set the value of the content control properties. Instead of that, we suggest you use the getContentControlInfo API to get information about the selected content control, and you can modify the values of the properties and set them using setContentControlInfo. |
Regards,
Kavitha M
Attachment: Demo_Reference_9c025766.zip
- 1 Reply
- 2 Participants
-
NC Nico Chiaro
- May 3, 2025 07:17 PM UTC
- May 5, 2025 01:31 PM UTC