Plugin Directory

Changeset 3571469


Ignore:
Timestamp:
06/14/2026 02:58:58 AM (4 months ago)
Author:
jorgedelcampo
Message:

Plugin update: version 1.0.2

  • HOTFIX: increased line numbers when text overflows textarea vertically
  • Text wrapping deleted: Horizontally scrollable textarea
Location:
advanced-editor-for-additional-css
Files:
7 added
4 edited

Legend:

Unmodified
Added
Removed
  • advanced-editor-for-additional-css/trunk/README.md

    r3559195 r3571469  
    5959== Changelog ==
    6060
     61= 1.0.2 - 13 jun, 2026 =
     62* HOTFIX: increased line numbers when text overflows textarea vertically
     63* Text wrapping deleted: Horizontally scrollable textarea
     64
    6165= 1.0.1 - 3 jun, 2026 =
    6266* New styles to avoid textarea overflowing
  • advanced-editor-for-additional-css/trunk/advanced-additional-css.php

    r3559195 r3571469  
    33 * Plugin Name: Advanced editor for Additional CSS
    44 * Description: Enhance the Additional CSS editor in Gutenberg / FSE with line numbers, indented and improved styling.
    5  * Version: 1.0.1
     5 * Version: 1.0.2
    66 * Author: Jorge del Campo Andrade
    77 * Author URI: https://jdca.cl
  • advanced-editor-for-additional-css/trunk/css/editor-style.css

    r3559195 r3571469  
    99    overflow: hidden;
    1010    height: 65vh;
     11    position: relative;
    1112}
    1213
    … …  
    2223    border-right: 1px solid #ccc !important;
    2324    white-space: pre !important;
     25    overflow-x: hidden !important;
     26    overflow-y: scroll !important;
     27    flex-shrink: 0 !important;
     28    scrollbar-width: none !important;
     29    -ms-overflow-style: none !important;
     30}
     31
     32.gcss-pro-line-numbers::-webkit-scrollbar {
     33    display: none !important;
     34}
     35
     36.gcss-pro-line-numbers div {
     37    height: 19.5px !important;
     38    line-height: 19.5px !important;
    2439}
    2540
    … …  
    3853    box-shadow: none !important;
    3954    resize: none;
    40     text-wrap: wrap !important;
    41     white-space: wrap !important;
     55    overflow-x: auto !important;
     56    overflow-y: auto !important;
    4257}
  • advanced-editor-for-additional-css/trunk/js/editor-script.js

    r3547312 r3571469  
    1717        const syncLines = () => {
    1818            const lines = textarea.value.split('\n').length;
    19             lineNumbers.innerText = Array.from({length: lines}, (_, i) => i + 1).join('\n');
     19            lineNumbers.innerHTML = Array.from({length: lines}, (_, i) => i + 1).map(n => `<div>${n}</div>`).join('');
     20           
     21            // Ajustar la altura de los divs de números de línea para coincidir con el textarea
     22            const lineHeight = parseFloat(getComputedStyle(textarea).lineHeight) || 19.5;
     23            const divs = lineNumbers.querySelectorAll('div');
     24            divs.forEach(div => {
     25                div.style.height = lineHeight + 'px';
     26                div.style.lineHeight = lineHeight + 'px';
     27            });
    2028        };
    2129
Note: See TracChangeset for help on using the changeset viewer.