• Resolved pb52

    (@paulbarrett1952)


    I have been experiencing a lot of problem with the title of a drop down being blank.

    I think I have tracked down the reason. The plugin syntax appears to be extremely sensitive to the placement of formatting tags such as <strong>.

    Take this example:
    [expand title="<strong>Getting Started</strong>"]
    As shown the </strong>tag is placed to the left of the double quote mark and the command works. Place the tag to the right of the double quote mark and the title is blanked out.

    This effect can only be seen in preview, is invisible in the Visual Editor and the root cause can only be seen in the Text Editor.

    If you use the Visual Editor you need to take extreme care when applying formatting to text. It is best to preview a section as soon as you have applied Collapse-O-Matic to it. If the title is blank or the function is misbehaving in some other way, switch to the Text Editor and check the placement of the command elements in relation to any formatting tags.

    This is another reason why the plugin needs to be enhanced to play nicely with the Visual Editor. A typical WordPress user will create content in the Visual Editor. Only an html expert would want to spend time in the Text Editor.

    As it stands, the plugin seems to be a programmer’s tool, not an editor’s and this is a shame because it is GREAT at what it does when it does it right. But you have to spend too long arm wrestling it into submission.

    • This topic was modified 9 years, 2 months ago by pb52.
    • This topic was modified 9 years, 2 months ago by pb52.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author twinpictures

    (@twinpictures)

    For more advanced uses, it’s best to check out the roll-your-own method. This is especially true if you are wanting to use HTML inside the trigger, as shortcodes do not like to have HTML inside of the attributes values.

    As for Visual Composers, we agree 100%. Visual Composers are powerful tools, however since there are many types of frameworks, and not a standard, official WordPress api to create universal Visual Composer Widgets, Collapse-O-Matic will most likely outlive its original design objectives.

    Regardless, thank you for the feedback and honest assessment.

    Thread Starter pb52

    (@paulbarrett1952)

    Thank you for the response. While I hear what you are saying, I think that my use case – a list of collapsing items progressing down the page with bold titles and single line spacing – could hardly be described as a ‘more advanced use.’ I would have said it was the most basic use of the plugin that you could imagine.

    I have now discovered another sensitivity. If I add the items in visual editor a single return after each one look right in VE but when previewed the return is not honoured and all the items for a continuous list on one or more lines.

    In the VE the only fix is to add an extra return between items. But in Preview that results in double line spacing between items. Go into TE to fix that by taking out the blank rows above and below &nbsp;and normal service is resumed until you add further items at which point the items all collapse under into one line again, and you have to fix it again.

    The good news is that the content I am building is a static help page so once I am done I should not need to revisit this too often.

    Plugin Author twinpictures

    (@twinpictures)

    Ok let’s take this one by one.

    a list of collapsing items progressing down the page with bold titles and single line spacing – could hardly be described as a ‘more advanced use.

    The method you where using to do this was something like:
    [expand title="<strong>trigger</strong>"]target[/expand]
    According to the WordPress Shortcode API on using HTML:

    Starting with version 3.9.3, use of HTML is limited inside shortcode attributes. For example, this shortcode will not work correctly because it contains a ‘>’ character

    So two ways this can circumvented is by using the shortcode as follows:

    Option 1: change the tag to strong:
    [expand title="trigger" tag="strong"]target[/expand]

    Option 2: make the trigger bold using CSS:
    [expand title="trigger" trigclass="my_bold_class"]target[/expand]
    (you would need to have defined .my_bold_class in your theme’s css or in the plugin’s Custom CSS section of the options page.

    The issue with the Visual Editor stripping out attributes is known, but a workaround has been described here:
    https://ww.wp.xz.cn/support/topic/a-fix-for-rel-attribute-being-stripped-by-tinymce-and-breaking-highlander/

    However, it’s very likely you would not need something so extreme.
    First try using one of the alternative shortcode solutions described above.

    Best of luck, and let us know how it goes!

    Thread Starter pb52

    (@paulbarrett1952)

    OK but all of that shortcode was supplied by the VE. It’s not something I chose to include or wrote myself. It’s ironic that versions 3.9.3+ limit the use of HTML inside shortcode attributes but it’s own VE generates them.

    To be clear, I write in VE. I’m an editor not a developer so even if i knew what to do with CSS, which I don’t and don’t want to, there’s no way I’m stepping outside the VE when I want to add bold attributes, colour, heading or subheadings.

    I’m marking this as resolved because I think we’ve taken this as far as we can. You’ve provided a solution, but it’s beyond my ability to implement. I think that reinforces the point that this plugin is for developers not editors. 🙁

    It’s still great at what it does though. It’s the HOW that’s the issue for me. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Blank Titles’ is closed to new replies.