pixelgrade / gridable

The Missing WordPress Grid Content Editor
GNU General Public License v3.0
9 stars 2 forks source link

Add Row button doesn’t work in Text editor #80

Closed raduconst closed 5 years ago

raduconst commented 6 years ago

Works great in Visual editing mode, but generates an error in Text mode.

To fix, in gridable/admin/js/add-row-button.js:

  1. Replace line 49 with if ( typeof tinyMCE.activeEditor !== "undefined" && tinyMCE.activeEditor ) {

  2. Replace line 55 with:

} else if ( window.quicktags ) {
    /**
     * Insert the new shortcode in the Text editor
     */
    var column_shortcode = '[col size="6"]\n\n' + gridable_editor_params.new_column_content + '\n\n[/col]';
    var row_shortcode = '[row cols_nr="2"]' + column_shortcode + column_shortcode + '[/row]';
    window.QTags.insertContent( row_shortcode );
}

ref: https://wordpress.org/support/topic/add-row-button-doesnt-work-in-text-editor/

BurloiuCosmin commented 5 years ago

Problema a fost rezolvata aici: https://github.com/pixelgrade/gridable/commit/5d4c035a506545b37c4d021957ef6bacb0a7b541