Forums

How to modify the generated HTML the blockquote button makes? (4 posts)

  1. frobitz
    Member
    Posted 2 years ago #

    I've got quite a visual design for blockquotes in the content of a site I'm coding. It requires the use of the sliding doors technique to show an expanding background to wrap varying length content.

    So basically I want the blockquote button in the editor to make this HTML by default:

    <blockquote><div></div></blockquote>

    So that the two background images used can be attached via CSS to these HTML elements, and content generated by the editor is contained inside the DIV tags.

    Is there a way to do this without hacking the core?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    The editor normally creates <blockquote><p></p></blockquote>, so why not style on this tags?

  3. frobitz
    Member
    Posted 2 years ago #

    It limits the user to only having one P tag in the quote and CSS isn't quite up to scratch across the browsers I have to support to deal with attaching styles only to the first child of the blockquote tag.

    I've considered using JavaScript for older browsers, but that's a fallback position and I'd like to solve it at the WordPress/PHP level if possible.

    Thanks for your suggestion though, appreciated.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Do you want this modified markup to be added via the Visual Editor or the HTML tab? If it's the latter, have a look at the Quicktag Extender plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic