Replace the default TinyMCE source code modal with a powerful, modern CodeMirror 6 editor. Includes automatic HTML beautifier, syntax highlighting, OneDark theme, and Shadow DOM isolation to prevent CSS conflicts.
Si vous souhaitez soutenir le développement, vous pouvez faire un don via PayPal :
- Gerits Aurelien (Author-Developer) aurelien[at]magix-cms[point]com
- CodeMirror 6 Engine: Lightweight and blazing fast rendering.
- OneDark Theme: Elegant dark mode for syntax highlighting (HTML, CSS, JS inline).
- Auto-Beautifier: Automatically formats and indents TinyMCE's minified HTML output.
- Shadow DOM Isolation: Protects the editor's syntax colors from aggressive TinyMCE modal CSS resets.
- Download the
dist/codesource.ziparchive. - Unzip archive in tinyMCE plugin directory (
tiny_mce/plugins/codesource/). - Ensure
codemirror.bundle.jsandplugin.min.jsare present in the directory.
<script type="text/javascript">
tinymce.init({
selector: "textarea",
// Do not include the default 'code' plugin, use 'codesource' instead
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks fullscreen",
"insertdatetime media table contextmenu paste codesource"
],
toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | codesource",
});
</script>This file is part of tinyMCE. YouTube for tinyMCE Copyright (C) 2011 - 2026 Gerits Aurelien Redistributions of files must retain the above copyright notice. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ####DISCLAIMER Do not edit or add to this file if you wish to upgrade jimagine to newer versions in the future. If you wish to customize jimagine for your needs please refer to magix-dev.be for more information.