Question

I'm trying to embed a tweet in TinyMCE's WYSIWYG. When I place the content on the page, the html looks like this:

<blockquote class="twitter-tweet" lang="en"><p>Equally Armed !!! AR-15, the Modern Musket <a href="http://t.co/GnuhTTkQML">pic.twitter.com/GnuhTTkQML</a></p>&mdash; John Sykes (@johnsykes1035) <a href="https://twitter.com/johnsykes1035/statuses/452098680607490048">April 4, 2014</a></blockquote>

So the content is within the blockquote tag.

NOW - if this is the ONLY entry on the page, when I come back to re-edit, I get stuck inside the blockquote, no matter where I place the cursor or how many enter I press, it never escapes the blockquote.

Same problem is the tweet is the first thing on the page and then I write text... I cannot go ABOVE the tweet to insert text because if I place my cursor above it and press enter, I'm still inside the blockquote. If the tweet is at the bottom, then it doesn't matter that I put the cursor at the end of the text and hit enter, I'm still inside the blockquote tags.

I've even tried wrapping it an div like so:

<div><blockquote class="twitter-tweet" lang="en"><p>Equally Armed !!! AR-15, the Modern Musket <a href="http://t.co/GnuhTTkQML">pic.twitter.com/GnuhTTkQML</a></p>&mdash; John Sykes (@johnsykes1035) <a href="https://twitter.com/johnsykes1035/statuses/452098680607490048">April 4, 2014</a></blockquote></div>

But then it just stays trapped inside the div.

So HOW exactly would one be able to escape the blockquote when you re-initialize tinyMCE with this content for editing?

I need client friendly solution.

Thank you

Was it helpful?

Solution

Hit enter a few times, then choose paragraph Format.

https://dl.dropboxusercontent.com/u/67589325/blockquote.png


edit More correctly, you should not choose paragraph format, but unselect the blockquote format. For the case when the cursor is above the blockquote, deselecting blockquote format is a solution.


Here is a solution that, although technically suboptimal, it does the trick.

Initialize your editor with the value:

<p></p><blockquote>tweet tweet tweet</blockquote><p></p>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top