# Ready-Made Oxygen Integration

[![Version](https://img.shields.io/badge/version-1.3.2-blue.svg)](https://levels.dev)
[![WordPress](https://img.shields.io/badge/wordpress-5.0%2B-green.svg)](https://wordpress.org)
[![Oxygen](https://img.shields.io/badge/oxygen-4.0%2B-purple.svg)](https://oxygenbuilder.com)
[![License](https://img.shields.io/badge/license-GPL%20v2%2B-red.svg)](https://www.gnu.org/licenses/gpl-2.0.html)

Essential WordPress plugin for integrating the [Ready-Made Figma plugin](https://www.figma.com/community/plugin/1492108013732875788) with Oxygen 4, enabling seamless copy-paste functionality from Figma designs to Oxygen Builder.

---

## 🚀 Description

This plugin connects your WordPress/Oxygen installation with the [ready→made Figma plugin](https://www.figma.com/community/plugin/1492108013732875788), enabling developers and designers to copy sections from Figma and paste directly into Oxygen Builder’s structure view.

You’ll get a new button in the Oxygen editor, allowing you to insert copied components from Figma with full structure and class preservation.

### Features

- ✅ Copy-paste from Figma to Oxygen 4
- ✅ Zero configuration – plug and play
- ✅ Lightweight and fast (no bloat)
- ✅ Clean integration with verified console feedback
- ✅ Works with class systems like Automatic.css
- ✅ Font Matching: Automatically converts Figma font names to Oxygen-compatible names (e.g., "BreeSerif" → "Bree Serif")

### How It Works

A lightweight JS snippet is injected into the Oxygen editor footer to provide a bridge between your Oxygen install and the Figma plugin. Once active, elements copied in Figma become paste-ready in Oxygen with one click.

---

## 📦 Installation

### From WordPress.org

1. Go to *Plugins > Add New*
2. Search for **Figma to Oxygen Builder**
3. Click *Install Now* and *Activate*

### Manual Upload

1. Download ZIP
2. Go to *Plugins > Add New > Upload Plugin*
3. Select the file and activate


---

## 🧰 Requirements

- WordPress 5.0+
- Oxygen Builder 4.0+
- [ready→made Figma Plugin](https://www.figma.com/community/plugin/1492108013732875788)
- Chrome, Firefox, Safari, Edge (latest)

---

## ✅ Verification

1. Activate the plugin
2. Open Oxygen Editor
3. Open the dev console (F12)
4. Look for: `"Ready-Made Oxygen Integration active"`

---

## ❓ FAQ

### Do I need to configure anything?
No. Just activate it.

### What is ready→made?
A Figma plugin that copies structured elements for direct pasting into Oxygen.

### Does this slow my site down?
No. It's only active in the Oxygen editor.

---

## 🛠️ Troubleshooting

If pasting doesn't work:

- Ensure plugin is active
- Clear browser cache
- Confirm you're using Oxygen 4+
- Disable conflicting plugins temporarily

### Firefox Users
- **First time**: A permission modal will appear - paste your JSON and click "Allow & Paste"
- **Subsequent times**: Direct pasting works without modal
- **If issues persist**: Refresh page to reset permissions

---

## 🧑‍💻 Support

Email: [support@levels.dev](mailto:support@levels.dev)

Include WP version, Oxygen version, and browser.

---

## Contributing

Contributions to this plugin are welcome! Please feel free to submit a Pull Request.

---

## 📜 License

GPL v2 or later – [View License](https://www.gnu.org/licenses/gpl-2.0.html)

---

## 📓 Changelog

### 1.2.3 – Image Duplicate Check
- 🐑🐑 NEW: Intelligent duplicate detection - automatically detects and reuses existing images based on content hash

### 1.2.2 – Code Block Paste Fix
- 🐛 **Fixed**: Native paste now works correctly in Oxygen code blocks and contenteditable elements

### 1.2.1 – Progress Indicator
- 📊 **Progress Indicator**: Visual progress bar for image uploads to WP Media Library with real-time tracking

### 1.2.0 – Firefox Compatibility
- ✨ **Firefox Support**: Complete Firefox clipboard compatibility with unified permission modal
- 🛡️ **Context Menu Fix**: Eliminated unwanted "Einfügen" context menu in Firefox
- 🔧 **Browser Detection**: Chrome users get direct clipboard access, Firefox users get specialized handling
- 📱 **Session Memory**: Firefox permission modal only appears once per session
- 🚀 **Improved UX**: Streamlined workflow - permission + paste in single action
- 🔄 **Error Recovery**: Automatic permission reset and retry on clipboard failures
- 📊 **Progress Indicator**: Visual progress bar for image uploads to WP Media Library

### 1.1.0 – Font Matching Implementation
- Font matching feature added

### 1.0.1 – Image Upload Feature
- Added image upload support to WordPress Media Library

### 1.0.0 – Initial Release
- Integration with ready→made Figma plugin
- Copy-paste Oxygen sections from Figma

---

Built with ❤️ by [Levels.dev](https://levels.dev)
