Using new code block in WYSIWYG editor

Hi all,

There are new code and pre elements in WYSIWYG eidtor (added in v11.10.0).

I have problems with using them.

<code> element doesn’t seem to support multiline code blocks. Am I missing something or is this a limitation of the feature?

+ is there a way to add language specifier like in markdown → ```javascript

1 Like

Hi @marekbrze, sorry to hear you’re having problems, the <code> element doesn’t support multiline code blocks you’re correct since that is a plain HTML <code> element. To preserves newlines you’ll need to wrap <code> in a <pre> element.

As for adding a language specifier, that is something I don’t think we have at the moment but I will check on it.