BBcode color tags in a theme

Thats pretty cool. Thanks.

I am thinking of simplifying this further by adding a new toolbar button which looks like a color block.
Clicking on it will open a simple layer with preselected colors:

image

Clicking a color there will then perform the regular wrapWith composer method that adds the

[wrap=colorme color=blue]Hi there![/wrap]

around the selected text. Then, your code up there with decorateCookedElement() kicks in and renders it accordingly.

That sounds like an intuitive approach to me where ppl don’t have to write cryptic code to get colors.
I think I can whip this together in a theme component.

9 Likes