WordPress.org

Ready to get started?Download WordPress

Forums

Visual Editor Custom Buttons
Plugin adding extra code (3 posts)

  1. ModularBase
    Member
    Posted 1 year ago #

    Great plugin. Does what I want except - I have created two divs of which one goes inside of the other - class="accordian" and class="accordiantext". They both do what they are supposed to do, but the plugin seems to add extra code tags when inserting the one inside the other. See example:

    This is what it is supposed to look like:

    <div class="accordian">
    <h3>Test header</h3>
    <div class="accordiantext">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
    </div>

    This is what I get:

    <h3></h3>
    <div class="accordian">
    <h3>Test header</h3>
    <div class="accordiantext">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
    </div>
    <p> </p>

    The extra <h3></h3> and <p> </p>(with nbsp;) are not supposed to be there, as I didn't put them in.

    I have done this several different ways - wrapping all with outside tags - wrapping inside first, the outside - to no avail.

    This is baffling.
    Any suggestions?

    http://wordpress.org/extend/plugins/visual-editor-custom-buttons/

  2. Dusza
    Member
    Posted 5 months ago #

    I am having similar problems using simple tags. The buttons from this plugin insert the correct tag on first click, however when I click again, &nbsp;  appears. Any help would be appreciated and otherwise this is one of my favorite plugins for this sort of thing.

  3. Dusza
    Member
    Posted 5 months ago #

    UPDATE/RESOLVED:

    on line 954 of the plugin PHP file you can see where the   is. I simply removed that and this plugin is working perfectly now.

    LINE 954, change:
    $content .= "QTags.addButton( 'btn".$count."', '".$tagtitle."', '".$block_content."', '&nbsp;' );

    to
    $content .= "QTags.addButton( 'btn".$count."', '".$tagtitle."', '".$block_content."', '' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic