Problem/Motivation
Instead of doing #3263384: Add ckeditor5-code-block package and CodeBlock plugin and the various blockers, have a simple "PRE" custom button to avoid people having to use source editing for this and leave the upgrade path to contrib (specifically https://www.drupal.org/project/codesnippet)
Issue fork drupal-3269059
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nod_Comment #4
wim leersThere's no commits pushed here yet, so I can't see what it does/what the UX is yet 🤓
Comment #5
lauriiiI think we should integrate the new button to the heading plugin since it already provides an API that allows us to add additional elements to the dropdown. This would provide feature parity to CKEditor 4 and we wouldn't worry about issues with element conversion (heading to
<pre>or<pre>to<p>etc). If we created a completely new button, we would also have to figure out UX for it, including design for a button.Adding screenshot from CKEditor 4 here:
Comment #6
wim leers@lauriii what about #3263384-16: Add ckeditor5-code-block package and CodeBlock plugin?
Comment #7
nod_Comment #8
nod_closing, other solution works fine too.
Comment #9
vitaliyb98 commentedAdded a simple module that integrates the <pre> tag into the CKEditor headings dropdown https://www.drupal.org/project/ckeditor5_pre