=== OmniWrite AI Addon for Elementor ===
Contributors:      arnabdev1305
Tags:              elementor, ai, content generator, chatgpt, openai
Requires at least: 6.0
Tested up to:      7.0
Requires PHP:      7.4
Stable tag:        1.0.0
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Bring OmniWrite AI content and image generation directly into the Elementor editor. Requires OmniWrite AI and Elementor.

== Description ==

**OmniWrite AI for Elementor** is a free addon that brings the power of [OmniWrite AI](https://wordpress.org/plugins/omniwrite-ai/) directly into the Elementor page builder. Write content and generate AI images without ever leaving the Elementor interface.

This plugin requires both **OmniWrite AI** (the parent plugin) and **Elementor** to be installed and active.

= What it adds to Elementor =

**AI buttons on every text control** — When you open any widget's settings panel, a small AI button appears beside every text and textarea field. Click it to generate content directly into that field with full tone and length options.

**AI button on image controls** — A generate button appears on Elementor image and media controls. Generate an image from a prompt and insert it directly into any image widget — the image is saved to your Media Library automatically.

**Floating AI toolbar** — Two persistent buttons (Write with AI and Generate Image) are pinned to the bottom of the Elementor editor panel at all times. They target the last focused control, giving you one-click AI access from anywhere in the editor without needing to open a widget first.

= Requirements =

* [OmniWrite AI](https://wordpress.org/plugins/omniwrite-ai/) plugin — free, installed and active
* [Elementor](https://wordpress.org/plugins/elementor/) version 3.0.0 or higher
* An OpenAI API key configured in OmniWrite AI settings, or an AI provider configured via WordPress Connectors (WordPress 7.0+)

= How it works =

1. Install and activate both OmniWrite AI and this addon
2. Open any page or post in the Elementor editor
3. AI buttons appear beside every text field and in the floating bottom toolbar
4. Click any AI button, enter your prompt, choose tone and length, and click Generate
5. Preview the result and insert it directly into the widget

No extra configuration required — the addon reads your existing OmniWrite AI settings automatically.

== Installation ==

1. Make sure **OmniWrite AI** (free) and **Elementor** are installed and active first
2. Upload the `omniwrite-ai-for-elementor` folder to `/wp-content/plugins/`
3. Activate the plugin from **Plugins → Installed Plugins**
4. Open any page in Elementor — the AI tools are ready to use

== Frequently Asked Questions ==

= Do I need a separate API key for this addon? =
No. This addon uses the API key and settings already configured in OmniWrite AI. No additional setup is needed beyond what you have already configured.

= Does it work with Elementor Free or only Elementor Pro? =
It works with both Elementor Free and Elementor Pro. AI buttons appear on all standard Elementor widgets and all Elementor Pro widgets.

= What happens if OmniWrite AI is not installed? =
The addon will not load and will show a clear admin notice explaining that OmniWrite AI is required and providing a link to install it.

= Which widgets are supported? =
AI text buttons appear on all widgets that have text or textarea controls — Heading, Text Editor, Button, Accordion, Toggle, Icon Box, Image Box, and all Pro widgets with text fields. AI image buttons appear on all widgets with image/media controls.

= Will this slow down the Elementor editor? =
No. Assets are only loaded inside the Elementor editor (not on the front end) and no API calls are made unless a user actively clicks a Generate button.

= Does it work with WordPress 7.0 AI Client? =
Yes. When OmniWrite AI is configured to use the WordPress AI Client (WordPress 7.0+), this addon automatically benefits from it — all AI requests go through the same OmniWrite AI REST endpoints regardless of which provider is active.

== External services ==

This plugin does not connect to any external services directly. All AI functionality is routed through the OmniWrite AI plugin via its internal WordPress REST API endpoints. The OmniWrite AI plugin handles all connections to the OpenAI API (or whichever AI provider is configured).

Please refer to OmniWrite AI for full details on external service usage, data handling, and applicable terms:
[OmniWrite AI on WordPress.org](https://wordpress.org/plugins/omniwrite-ai/)

== Changelog ==

= 1.0.0 =
* Initial release
* AI Write buttons on all Elementor text and textarea widget controls
* AI Image buttons on Elementor image and media widget controls
* Floating AI toolbar pinned to the bottom of the Elementor editor panel
* Targets last focused control from the floating toolbar
* Reads OmniWrite AI settings automatically — no separate configuration
* Admin notices if OmniWrite AI or Elementor is missing or incompatible
* Fully translatable (i18n ready)

== Upgrade Notice ==

= 1.0.0 =
Initial release — no upgrade steps required.
