Page 1 of 1

Adding code-formatting to TinyMCE

Posted: Sun Nov 14, 2021 10:41 pm
by bnetz
Hi,
I am running Bludit 3.13.1 with TinyMCE 5.4.1.
I want mark text and click a button or choose a formatting so the text is surrounded by

Code: Select all

<code>code-tags</code>
The codesample-option (like mentioned in this thread) is not an option, because I have to do it often and I just want to change the formatting of existing text to code.
I would appreciate help very much!

Re: Adding code-formatting to TinyMCE

Posted: Mon Nov 15, 2021 10:41 am
by Edi
You can use the plugin Code Sample for TinyMCE.

Go to the settings of TinyMCE and add codesample to the field "Toolbar top" or "Toolbar bottom" and to the field "Plugins".