Highlighting text in different colours

This is a bit trickier but doable…

You can start by cloning one of the other editor buttons - like $:/core/ui/EditorToolbar/bold - and after you change the description, caption, icon etc you could change the action-widget in the text field to be something like:

<$action-sendmessage
	$message="tm-edit-text-operation"
	$param="wrap-selection"
	prefix="@@"
	suffix="@@"
	trimSelection="yes"
/>

This will create the yellow highlight… There may be a way to have a dropdown set a colour - but that requires a bit more tweaking of the action setting… Let me keep tinkering - BRB

1 Like