Hey guys,
I need to have a custom property for my links on my editor that adds a data attribute to the links of a checkbox is checked. I have managed to add the checkbox by doing so:
On dialog definition. However, I have no idea where to even start on how to add a custom attribute on a link if that checkbox is checked, and remove it if it is not. Are there any examples of something similar? How would I approach that problem?
Thanks a lot.
I need to have a custom property for my links on my editor that adds a data attribute to the links of a checkbox is checked. I have managed to add the checkbox by doing so:
var info = dialog.getContents("info"); info.elements.push({ "type": "vbox", "id": "urlOptions", "children": [{ "type": "hbox", "widths": ["100%"], "children": [{ "id": "button", "type": "checkbox", "label": "Button" }] }] });
On dialog definition. However, I have no idea where to even start on how to add a custom attribute on a link if that checkbox is checked, and remove it if it is not. Are there any examples of something similar? How would I approach that problem?
Thanks a lot.