WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
WP 3.3 - how to add wp_editor (WYSIWYG) to description area (3 posts)

  1. Stephen S
    Member
    Posted 2 years ago #

    I formerly used a great plugin (NextGen TinyMCE Picture Description) to add WYSIWYG to the description field in NextGen, but WP 3.3 broke this. I was unable to fix the plugin directly, but I was able to add code directly into NextGen core (bad, I know, but I really needed this) to make this work. For anyone that is interested, I am sharing that info here:

    1. Go to line 474 in file /wp-content/plugins/nextgen-gallery/admin/manage-images.php (make sure you are using NextGen Gallery 1.9.1)

    2. Remove this block:
    <textarea name="description[<?php echo $pid ?>]" style="width:95%; margin-top: 2px;" rows="2" ><?php echo stripslashes($picture->description) ?></textarea>

    3. Replace with this block:

    <?php $editor_id = "description[". $pid . "]";
    $tacontent = stripslashes($picture->description);
    wp_editor($tacontent,$editor_id,array("media_buttons"=>FALSE,"textarea_name"=>$editor_id,"teeny"=>true,"textarea_rows"=>4,"editor_css"=>"<style>.wp-editor-container{width:95%;}</style>","quicktags"=>false,"tinymce"=>array("theme_advanced_buttons1"=>"bold, italic, underline, blockquote, separator, strikethrough, link, unlink") ));?>

    4. Change the config for the buttons you want to show, num of rows, etc.

    5. Save file and enjoy.

    Again, I am not saying it is a great idea to modify the core, but in this case it was the only thing I could do, since I could not get the plugin to work and there were no alternatives. I think this should definitely be in the core. (along with per gallery thumbnail settings, but that is another matter...)

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. eyup
    Member
    Posted 1 year ago #

    Hi,

    It works but it can't handle text returns. All the text runs in one line.

    Is there a solution to retain them?

    The NextGEN TinyMce Description plugin works now - BUT with one problem:

    Special characters such as £ and accented characters eg Ä.Ö.Ü show as �

    Maybe someone knows of a solution to this problem?

  3. eyup
    Member
    Posted 1 year ago #

    Found a solution!

    Install TinyMCE Advanced plugin and in settings tick the button that says 'stop removing the <p> and </br> tags!

    hurrah!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic