I'm currently trying to add text/background colors to VisualEditor. I think the right approach is to add a widgets like the one the language annotation uses, but I am stuck.
Maybe someone added the color functionality or custom widgets to the VisualEditor and may share his/her experience with me?
That's my current state:
I think I need to replicate the Inspector-class (besides others), but that's the one I'm stuck on. I copied the LanguageInspector.js
, removed everything about dir
and changed everything from language
to textColor
(that's how my annotation-class is named). But when I add it to the VisualEditor.php, I get a
Error: Module ext.visualEditor.core has failed dependencies