ContentTools icon indicating copy to clipboard operation
ContentTools copied to clipboard

Hot to keep style attributes on save.

Open bence-palkovics opened this issue 2 years ago • 0 comments

Hi, I'm trying to use the style attribute to store modifications like color or font-size change, however when I save the project, these attributes are erased. How could I keep these attributes on save?

Here is a code snippet, used in a custom tool:

SelectColor();
element._domElement.style.color = selectedColor;
element.addCSSClass(this.className);
callback(true);
return this.dispatchEditorEvent('tool-applied', toolDetail);

bence-palkovics avatar May 30 '22 21:05 bence-palkovics