WordPress.org

Ready to get started?Download WordPress

Forums

Rich Text Widget
Some suggestions for the new version (2 posts)

  1. ReynoldsTimJ
    Member
    Posted 2 years ago #

    I want to start off by saying I am a fan of this plugin. I was using version 0.2, and tried upgrading today. It was a bit rocky, but I got things working.

    I had to create wp-includes/js/tinymce/themes/advanced/skins/wp_theme directory and copy the content from wp-includes/js/tinymce/themes/advances/skins/default to get the plugin to work properly when I clicked "Activate".

    However, I still get a 404 loading wordpress.css from a different location, because that file does not exist. No big deal. The plugin still works.

    The suggestions that I have revolve around keeping the output consistent with older versions. For example:

    0.2: The class on the LI tag was rtw_widget
    1.X: The class on the LI tag is widget_richtext

    0.2: The content of the widget was wrapped in a DIV tag
    1.X: The content is no longer wrapped in the div.

    Both of these changes have broken my CSS. I have updated it, but I feel that you can have all the improvements without changing the fundamental output.

    Also, of note but not important, the ID of the outer LI element is now 'richetext-#' as opposed to 'richtext-#'. I assume this is a typo. Didn't affect me, but might someone else.

    I am going to jump into the code for this and see if I can change the output routines to make them consistent.

    But, again, thanks for making this.
    Tim

    http://wordpress.org/extend/plugins/rich-text-widget/

  2. ReynoldsTimJ
    Member
    Posted 2 years ago #

    Well, it seems the changes were quite easy to implement.
    here is a patch, it keeps your new classes while preserving the old class names and structure.

    21c21
    < 		$widget_ops = array('classname' => 'widget_richtext', 'description' => __( 'WYSIWYG widget','rtw' ) );
    ---
    > 		$widget_ops = array('classname' => 'widget_richtext rtw_widget', 'description' => __( 'WYSIWYG widget','rtw' ) );
    23c23
    < 		$this->WP_Widget('richetext', __('Rich Text','rtw'), $widget_ops,$control_ops);
    ---
    > 		$this->WP_Widget('richtext', __('Rich Text','rtw'), $widget_ops,$control_ops);
    32c32,33
    < 			echo $before_title.$title.$after_title;
    ---
    > 			echo $before_title.$title.$after_title;
    > 			echo '<div class="richtext">';
    33a35
    > 			echo '</div>';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic