Hi Robin,
I was able to reproduce the behavior you described, and from the HTML you shared it looks like the color formatting is not actually being removed when the text is deleted.
After deleting 123 and typing it again, the editor appears to lose the visual color indication in the editing area, but the underlying HTML still contains:
which explains why the text is displayed with the color when rendered elsewhere.
To me this looks more like a synchronization/rendering issue within the Sun Editor rather than a Mendix persistence issue. The editor UI is showing one thing, while the generated HTML contains different formatting information.
A few things I would check:
If the behavior is reproducible in a clean application, I'd strongly consider raising a bug report with the widget maintainer and providing the exact reproduction steps you've listed above. The fact that the editor display and generated HTML are out of sync is usually enough evidence for a defect report.
Out of curiosity, does pressing "Remove Formatting" before retyping the text change the behavior? That might help determine whether the editor is retaining formatting state after the deletion.
Hi Robin,
You can make use of the Rich Text widget below:
I have used this widget and have never faced any issues with it.