=== DeadTools Classic Editor Code Highlight ===
Contributors: deadtools
Tags: classic editor, code editor, codemirror, syntax highlighting, html
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds the same WordPress CodeMirror-based syntax highlighting used by core code editors to the Code/Text tab of the Classic Editor.

== Description ==

The plugin enhances only the standard Classic Editor code tab. It uses CodeMirror bundled with WordPress, so no external CDN or JavaScript library is loaded.

Features:
* HTML/CSS/JavaScript syntax highlighting.
* Line numbers.
* Active-line highlighting.
* Matching and auto-closing brackets/tags.
* Works for posts, pages and custom post types that support the standard editor, including ZipTrading products when they are opened in Classic Editor.
* Keeps the original textarea synchronized for autosave, revisions and publishing.
* Does not modify stored post content.
* Adds a one-click "Format HTML" button that pretty-prints the current code with real TAB indentation and readable line breaks.
* Formatting is performed inside CodeMirror and can be immediately undone with Ctrl+Z before saving.
* Preserves whitespace-sensitive PRE and TEXTAREA blocks.
* Deactivate the plugin to return to the standard editor immediately.

If WordPress syntax highlighting is disabled in the current user's Profile, the plugin respects that preference.

Author: DeadTools
https://deadtools.ru/

== Changelog ==

= 1.1.5 =
* Formatter button no longer depends on the native Quicktags toolbar.
* Added a dedicated compact formatter strip directly above CodeMirror, visible only in Code mode.
* Fixes installations where Quicktags is hidden or removed by another editor/plugin configuration.

= 1.1.4 =
* Fixed Visual/Code mode switching: CodeMirror is now destroyed before TinyMCE takes control.
* Quicktags visibility is no longer forced by the plugin.
* Formatter button is inserted into the native toolbar without reinitializing Quicktags.

= 1.1.3 =
* Restored the native WordPress Quicktags toolbar in Code mode.
* The HTML formatter is now registered through the official QTags.addButton API instead of direct DOM injection.
* Added self-healing for the content Quicktags instance and toolbar after CodeMirror initialization.

= 1.1.2 =
* Fixed the missing formatter control on some Classic Editor installations.
* The formatter button is now inserted directly into the native Quicktags toolbar next to the standard code controls.

= 1.1.1 =
* HTML formatter now uses a real TAB character for each nesting level instead of spaces.
* CodeMirror is configured to indent with tabs.

= 1.1.0 =
* Added a compact one-click HTML formatter above CodeMirror.
* Added undo-friendly formatting and protected PRE/TEXTAREA content.

= 1.0.0 =
* Initial release.
