=== TheDock Enhanced Rich Text Editor ===
Contributors: thedock
Donate link: https://thedock.io/
Tags: editor, tinymce, classic-editor, acf, wysiwyg
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Upgrade WordPress to TinyMCE 7 with a modern editing experience, table support, and seamless ACF integration.

== Description ==

TheDock Enhanced Rich Text Editor brings the power of **TinyMCE 7** to WordPress, replacing the outdated Classic Editor with a modern, feature-rich editing experience.

While the WordPress core team focuses on the Block Editor, many developers prefer the classic workflow with custom post types and custom fields. This plugin bridges this gap by providing a contemporary editor without abandoning the structured data approach that developers love.

= Key Features =

* **TinyMCE 7** - The latest version with improved performance and stability
* **Modern Interface** - Clean, intuitive toolbar design
* **Table Editor** - Full table support without additional plugins
* **Text Styling** - Inline text color and background color options
* **List Styles** - Multiple ordered and unordered list formats
* **Image Handling** - Inline images with percentage-based widths
* **Paste Cleaning** - Intelligent sanitization of pasted content

= ACF Integration =

Works seamlessly with Advanced Custom Fields:

* Textarea fields automatically get inline formatting (bold, italic, links)
* WYSIWYG fields receive the full TinyMCE 7 experience
* Repeater and Flexible Content fields fully supported
* Custom toolbar configurations per field

= Built for Developers =

This plugin was created by the team at [TheDock](https://thedock.io/), who build WordPress sites using structured content approaches. We needed a better classic editor, so we built one.

= TheDock Site Builder Integration =

For users of [TheDock Site Builder](https://thedock.io/site-builder/), this plugin provides additional capabilities:

* Apply your custom Typography styles directly in the editor
* Use colors from your Global Color Palette
* Full web font support
* Gradient text support

= Privacy =

This plugin:

* Does not track users
* Does not collect personal data
* Does not send data to external servers
* Does not use cookies

= Technical Notes =

The link autocomplete feature uses WordPress's built-in REST API to search for posts and media within your site. No external services are contacted.

= Source Code =

The full uncompressed source code for all JavaScript and CSS files is included in the `src/` directory of this plugin. The build configuration files (`Gruntfile.js`, `Brocfile.js`, `package.json`) are also included.

To build from source:

1. Install [Node.js](https://nodejs.org/) (v16 or later)
2. Run `npm install` to install build dependencies
3. Run `grunt build` to compile and minify assets

The compiled JavaScript is built from ES6 modules in `src/js/` using Rollup (via Broccoli). The compiled CSS is built from SCSS files in `src/css/` using Sass with PostCSS/Autoprefixer.

The full source code is also available on [GitHub](https://github.com/thedock/thedock-enhanced-rich-text-editor).

== Installation ==

= Automatic Installation =

1. Go to **Plugins > Add New** in your WordPress admin
2. Search for "TheDock Enhanced Rich Text Editor"
3. Click **Install Now** and then **Activate**

= Manual Installation =

1. Download the plugin zip file
2. Go to **Plugins > Add New > Upload Plugin**
3. Upload the zip file and click **Install Now**
4. Activate the plugin

= From Source =

1. Clone or download from GitHub
2. Run `npm install` to install dependencies
3. Run `grunt build` to compile assets
4. Upload the folder to `/wp-content/plugins/`
5. Activate through the Plugins screen

== Frequently Asked Questions ==

= Does this replace the Block Editor? =

Yes, TheDock Enhanced Rich Text Editor disables the Block Editor and provides a TinyMCE-based classic editor experience.

= Will this work with my existing content? =

Yes, the plugin works with standard WordPress content and HTML. Your existing posts and pages will work without modification.

= Does it work with ACF? =

Yes, the plugin has first-class support for Advanced Custom Fields. Textarea fields get inline formatting, and WYSIWYG fields get the full editor.

= Can I customize the toolbar? =

Yes, toolbar configuration is supported through ACF field settings and WordPress filters.

= Is it compatible with Classic Editor plugin? =

TheDock Enhanced Rich Text Editor serves a similar purpose to Classic Editor but with TinyMCE 7. You should deactivate Classic Editor when using this plugin.

== Screenshots ==

1. The modern TinyMCE 7 interface in action
2. Table editing capabilities
3. ACF textarea field with inline formatting
4. Text color and styling options

== Changelog ==

= 1.1.1 =
* Add support for provider-supplied editor styles (TheDock Typography) via the Styles dropdown
* Load the provider's editor stylesheet and body class so picked styles render inside the editor
* Run the tiny_mce_before_init filter late so server-side style_formats survive into the editor config
* Disable the Styles button when no custom styles are available instead of showing an empty dropdown
* Re-register style formatters when styles arrive after the editor has initialized
* Normalize varying style_formats shapes so styles work with or without TheDock

= 1.1.0 =
* Add JetEngine WYSIWYG and textarea field support
* Fix TinyMCE 7 compatibility with third-party plugins using TinyMCE 4 settings
* Prevent WordPress bundled TinyMCE 4 from overwriting TinyMCE 7
* Protect tinyMCEPreInit from being clobbered by WP core scripts
* Fix content_css to use TinyMCE 7 default stylesheet
* Hide Visual/Code tabs on JetEngine WYSIWYG fields
* Add inline editor styling for JetEngine textarea fields

= 1.0.0 =
* Initial release
* TinyMCE 7 integration
* ACF support for textarea and WYSIWYG fields
* Table editor included
* Inline text color and background color
* Paste content sanitization
* Drag-and-drop support for ACF repeater fields

== Upgrade Notice ==

= 1.0.0 =
Initial release of TheDock Enhanced Rich Text Editor.
