Skip to content

Instantly share code, notes, and snippets.

@biplobice
Created August 18, 2025 02:49
Show Gist options
  • Save biplobice/0b0fd82344dd5ed1fe4a7183bc01749e to your computer and use it in GitHub Desktop.
Save biplobice/0b0fd82344dd5ed1fe4a7183bc01749e to your computer and use it in GitHub Desktop.
Customize ckEditor config options
<?php
// application/config/site.php
return [
'sites' => [
'default' => [
'editor' => [
'ckeditor4' => [
'custom_config_options' => [
'entities' => false, // Disables conversion of characters to HTML entities entirely. Example: Stops converting © into &copy;, or & into &amp;.
'basicEntities' => false, // Prevents encoding of “basic” characters like &, <, >, ", '.
'entities_latin' => false, // Stops encoding Latin-based special characters (like ñ, é, ç) into HTML entities like &ntilde; or &eacute;.
'entities_greek' => false, // Prevents encoding of Greek characters (like α, β, Ω) into &alpha;, &beta;, etc.
'htmlEncodeOutput' => false, // Prevents CKEditor from encoding content on output (e.g., when switching between WYSIWYG and source view).
'forceSimpleAmpersand' => true, // Prevents CKEditor from converting & into &amp; unless it’s part of a valid HTML entity.
],
],
],
],
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment