In Drupal 9, is there a way to avoid CkEditor re-formats the source code?
There is one text editing mode set in Drupal, Full HTML. When I edit or create a Basic page node, once I click the Source button, paste in code, deselect Source, and then re-select Source, the formatted code becomes CkEditor-ified.
I only found posts from years ago or that aren't for Drupal 9. I've tried the CkEditor Config module and the WYSIWYG Linebreaks module, but both have no effect, or maybe they are not configured right.
I would like to paste in this source code and keep it as is.
<div id="equipments" class="equipment__grid">
<!-- equipment block fixed start -->
<div class="equipment__block">
<div class="equipment__block__img">
<img alt="TITLE" src="/change/me.jpg">
</div>
<div class="equipment__block__info">
<h3><a href="/change/me">TITLE</a></h3>
<p>Location: LOCATION<br />Asking Price: $PRICE</p>
</div>
</div>
<!-- equipment block fixed end -->
</div>
Instead CKEditor does this:
<div class="equipment__grid" id="equipments"><!-- equipment block fixed start -->
<div class="equipment__block">
<div class="equipment__block__img"><img alt="TITLE" src="/change/me.jpg" /></div>
<div class="equipment__block__info">
<h3><a href="/change/me">TITLE</a></h3>
<p>Location: LOCATION<br />
Asking Price: $PRICE</p>
</div>
</div>
<!-- equipment block fixed end --></div>
The CKEditor Config module is installed and activated. This is the current configuration.
This is the configuration for the WYSIWYG Linebreak module.
The Full HTML enabled filters are the following.