=== Eloquent ===
Contributors: Avram
Donate link: https://paypal.me/avramator
Tags: frontend, editor, live, eloquent, writing
Requires at least: 5.0
Requires PHP: 7.4
Tested up to: 7.0
Stable tag: 1.0
License: MIT
License URI: https://opensource.org/licenses/MIT

Eloquent is an awesome front-end editor for your website.

== Description ==

Eloquent is an awesome front-end editor for your website. Edit posts and pages directly from your website front-end!

It is not a full-featured editor like the WordPress editor in the admin panel, but it is a great solution for your not-too-tech-savvy clients to quickly edit existing posts and pages, right where they see them.

Features:
* Edit post/page title and content directly on the front end, with the same rich-text tools ContentTools provides
* Upload images straight to the WordPress Media Library - rotate and crop before inserting, no separate media step
* Pick which of your theme's own CSS classes are offered as one-click styles in the editor, curated from Settings / Eloquent
* Autodetect title/content selectors for your active theme, so there's nothing to hand-configure on a typical site
* Draft support - unpublished entries can be edited and published straight from the front end

Try it instantly on [tastewp.com](https://tastewp.com/new?pre-installed-plugin-slug=eloquent&redirect=%2F&ni=true)!

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/eloquent` directory, or install the plugin through the WordPress plugins screen directly.
1. Activate the plugin through the 'Plugins' screen in WordPress.
1. Use the Settings -> Eloquent screen to configure the plugin: set up title/content selectors (or use Autodetect) and pick which theme CSS classes to offer in the editor.
1. Enjoy using Eloquent!

== Frequently Asked Questions ==

= How do I upload images to the WordPress media library? =

Use the image tool in the front-end editor - it uploads straight into your Media Library, the same place block-editor uploads go. Rotate and crop it before inserting; there's nothing extra to configure.

= The Autodetect option isn't detecting selectors, what do I do? =

Set the selectors manually on the Settings / Eloquent screen. Use your browser's "Inspect element" tool on your theme's post title and content area to find their CSS classes.

= Can I choose which CSS classes are available in the editor? =

Yes. The "Editor styles" section on Settings / Eloquent lets you scan your site for classes your theme already uses (or add one manually), then pick which ones appear as one-click styles in the element properties dialog.

= I changed my theme and the editor stopped showing up, why? =

Different themes use different CSS classes for the title and content area, so Eloquent needs to re-detect (or be told) the new selectors. You'll see an admin notice after a theme switch linking straight to the settings screen.

== Screenshots ==

1. Eloquent editor
2. Image upload/edit dialog, now saving straight to the Media Library
3. Image/element attributes dialog, including one-click theme styles

== Changelog ==

= 1.0 =
* Fixed a bug where saving through the editor stripped Gutenberg's block markers, breaking the block editor on any post edited through Eloquent
* Images now upload to the WordPress Media Library instead of being embedded as base64 data in post content; rotate and crop are handled server-side
* Added a curated CSS class picker ("Editor styles") so theme classes can be applied to elements from inside the editor
* Fixed autodetection: the placeholder entry it creates is previewed rather than opened directly, so it no longer 404s on the front end
* Moved front-end save/publish/selector actions to the REST API, with proper capability checks and nonces
* Bundled SweetAlert2 locally instead of loading it from a CDN
* Updated ContentTools to 1.6.16
* General code cleanup and hardening (capability checks, output escaping, translatable strings)

= 0.2 =
* Updated SweetAlert
* Updated ContentEditor

= 0.1 =
* Initial version
