Hi,
the text widget WYSIWYG editor actually manage an HTML fragment, you can find it in the cockpit template.
So you can alter the cockpit template directly if the editor is not powerful enough for your needs.
You don't have to alter the source code.
Best regards,
Francesco