I want to have a cite underneath my blockquote, that has a certain style.
"Blockquotes are an essential part of a fancy website."
– Cite
The markup should look like this:
<blockquote><p>Blockquotes are an essential part of a fancy website."</p>
<cite>Cite</cite></blockquote>
But the WYSIWYG-Editor does not offer me the possibility to define a cite for the blockquote. And I can't force my users to write the HTML by hand.
Is there a way to make the WYSIWYG-Editor generate the required markup?
I want to have a cite underneath my blockquote, that has a certain style.
"Blockquotes are an essential part of a fancy website."
– Cite
The markup should look like this:
<blockquote><p>Blockquotes are an essential part of a fancy website."</p>
<cite>Cite</cite></blockquote>
But the WYSIWYG-Editor does not offer me the possibility to define a cite for the blockquote. And I can't force my users to write the HTML by hand.
Is there a way to make the WYSIWYG-Editor generate the required markup?
Share Improve this question edited Jun 4, 2014 at 10:00 Sebastian Starke asked Oct 23, 2013 at 12:02 Sebastian StarkeSebastian Starke 4613 gold badges10 silver badges22 bronze badges 8- Is this the same question as stackoverflow/questions/19540789/… or somehow essentially different? – Jukka K. Korpela Commented Oct 23, 2013 at 12:21
- 1 It actually isn't clear that that is a different question, nor is it entirely clear what you want with this question. Are you asking how to make the WYSIWYG editor generate all of that markup? – s_ha_dum Commented Oct 23, 2013 at 13:15
- 1 I think he's just trying to get the WYSIWYG editor to add in the Cite markup. – Howdy_McGee ♦ Commented Oct 23, 2013 at 13:50
- 1 -1 for "Preferably not another plugin..." A Plugin is the proper way to extend functionality to implement a solution for this issue. – Chip Bennett Commented Oct 23, 2013 at 14:26
- 2 That is why I said "preferably" not "I want definitely no plugin, I hate plugins". What I meant is just: If there is a simple sollution, like adding two lines of code to functions.php, I would prefer that. (Instead of adding the Mega-Editor-Markup-Plugin-Pack for WP.) – Sebastian Starke Commented Oct 23, 2013 at 16:17
1 Answer
Reset to default 3The TinyMCE Custom Styles Codex Page should get you through this.
There are code snippets on that page, but, as an overview, the process requires two steps:
- Add the TinyMCE "styleselect" element to the first or second row of icons.
- Add one or more elements to that styleselect menu.
If this were me, I would consider also removing the blockquote button from TinyMCE and then adding blockquote
as an option in the styleselect along with cite
. Doing it that way means your editors can find the correct markup for an entire blockquote
in one place.
And I hope this goes without saying, but make sure to implement a custom editor-style.css
file so that the blockquote
and cite
styles match the theme output.