Plugin Directory

Changeset 3381325


Ignore:
Timestamp:
10/20/2025 01:21:44 PM (5 months ago)
Author:
levelsdev
Message:

Version 1.2.2: Fixed native paste in Oxygen code blocks and contenteditable elements

Location:
ready-made-oxygen-integration
Files:
15 added
5 edited

Legend:

Unmodified
Added
Removed
  • ready-made-oxygen-integration/trunk/README.md

    r3375669 r3381325  
    11# Ready-Made Oxygen Integration
    22
    3 [![Version](https://img.shields.io/badge/version-1.2.1-blue.svg)](https://levels.dev)
     3[![Version](https://img.shields.io/badge/version-1.2.2-blue.svg)](https://levels.dev)
    44[![WordPress](https://img.shields.io/badge/wordpress-5.0%2B-green.svg)](https://wordpress.org)
    55[![Oxygen](https://img.shields.io/badge/oxygen-4.0%2B-purple.svg)](https://oxygenbuilder.com)
     
    117117## 📓 Changelog
    118118
     119### 1.2.2 – Code Block Paste Fix
     120- 🐛 **Fixed**: Native paste now works correctly in Oxygen code blocks and contenteditable elements
     121
    119122### 1.2.1 – Progress Indicator
    120123- 📊 **Progress Indicator**: Visual progress bar for image uploads to WP Media Library with real-time tracking
  • ready-made-oxygen-integration/trunk/includes/js/addPasteButton-modular.js

    r3375669 r3381325  
    33 * Modular structure for better maintainability
    44 *
    5  * Version: 1.2.1
    6  */
    7 
    8 console.log("READOXIN: ✅ Plugin loaded v1.2.1");
     5 * Version: 1.2.2
     6 */
     7
     8console.log("READOXIN: ✅ Plugin loaded v1.2.2");
    99
    1010// Verify modules are loaded
  • ready-made-oxygen-integration/trunk/includes/js/modules/uiComponents.js

    r3375666 r3381325  
    216216                         document.querySelector('[ng-controller="BuilderController"]');
    217217
    218       if (isInBuilder && event.target.tagName !== 'TEXTAREA' && event.target.tagName !== 'INPUT') {
     218      // Check if the target is an editable element that should use native paste
     219      const shouldAllowNativePaste = isEditableElement(event.target);
     220
     221      if (isInBuilder && !shouldAllowNativePaste) {
    219222        event.preventDefault();
    220223        pasteHandler();
     
    223226  });
    224227}
     228
     229/**
     230 * Check if an element should allow native paste behavior
     231 * @param {HTMLElement} element - The target element
     232 * @returns {boolean} - True if native paste should be allowed
     233 */
     234function isEditableElement(element) {
     235  if (!element) return false;
     236
     237  // Check tag name
     238  const tagName = element.tagName;
     239  if (tagName === 'TEXTAREA' || tagName === 'INPUT') {
     240    return true;
     241  }
     242
     243  // Check contenteditable
     244  if (element.isContentEditable || element.contentEditable === 'true') {
     245    return true;
     246  }
     247
     248  // Check if inside CodeMirror editor
     249  if (element.closest('.CodeMirror') || element.closest('.CodeMirror-code')) {
     250    return true;
     251  }
     252
     253  // Check if inside ACE editor
     254  if (element.closest('.ace_editor') || element.closest('.ace_text-input')) {
     255    return true;
     256  }
     257
     258  // Check if inside Monaco editor
     259  if (element.closest('.monaco-editor')) {
     260    return true;
     261  }
     262
     263  // Check for Oxygen code block specific classes (add any specific selectors)
     264  if (element.closest('.oxygen-code-block') ||
     265      element.closest('.ct-code-block') ||
     266      element.closest('[data-oxygen-code-block]')) {
     267    return true;
     268  }
     269
     270  return false;
     271}
  • ready-made-oxygen-integration/trunk/readme.txt

    r3375669 r3381325  
    55Requires at least: 5.0
    66Tested up to: 6.8
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.2
    88Requires PHP: 7.2
    99License: GPLv2 or later
     
    7171== Changelog ==
    7272
     73= 1.2.2 =
     74* Fixed: Native paste now works in Oxygen code blocks and contenteditable elements
     75
    7376= 1.2.1 =
    7477* Visual progress indicator for image uploads to WP Media Library
  • ready-made-oxygen-integration/trunk/ready-made-oxygen-integration.php

    r3375669 r3381325  
    77 * Plugin URI: https://levels.dev/automatic-webdevelopment-from-figma-via-copy-paste
    88 * Description: Essential integration for the Ready-Made Figma plugin to enable copy-paste functionality with Oxygen 4.
    9  * Version: 1.2.1
     9 * Version: 1.2.2
    1010 * Author: levels.dev
    1111 * Author URI: https://levels.dev
     
    2222define('SCRIPT_DEBUG', true);
    2323// Define plugin version
    24 define('READOXIN_JS_VERSION', '1.2.1');
     24define('READOXIN_JS_VERSION', '1.2.2');
    2525
    2626// Use global namespace for WordPress hooks
Note: See TracChangeset for help on using the changeset viewer.