Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#33335 closed defect (bug) (wontfix)

embedURL wp-view not detecting in div, only p tag.

Reported by: programmin's profile programmin Owned by: iseulde's profile iseulde
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Editor Keywords: reporter-feedback
Focuses: ui, javascript, administration Cc:


As described here, there's a cool link-edit-popup in 4.3:

Unfortunately if the post has divs instead of paragraphs, for example if you have MCE set to forced_root_block = 'div', you never see these. In wp-views.js you see it's matching paragraphs:

	views.register( 'embedURL', _.extend( {}, embed, {
		match: function( content ) {
			var re = /(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,
				match = re.exec( content );

			if ( match ) {
				return {
					index: match.index + match[1].length,
					content: match[2],
					options: {
						url: true
	} ) );

Change History (8)

#1 @dd32
8 years ago

  • Milestone changed from Awaiting Review to 4.3

Moving to 4.3 for review.

#2 @obenland
8 years ago

  • Owner set to iseulde
  • Status changed from new to reviewing

#3 @iseulde
8 years ago

  • Keywords reporter-feedback added

I'm not sure what mce-view.js has to do with the inline toolbar. I also tried <div>This is a <a href="">link</a>.</div>, but the inline toolbar shows. Could you maybe give us some content or a way to reproduce this? Thanks!

#4 @azaozz
8 years ago

Also note that using DIVs as "root blocks" is not supported in WordPress. There is also a warning against it in the TinyMCE config help:

This ticket was mentioned in Slack in #core by obenland. View the logs.

8 years ago

This ticket was mentioned in Slack in #core by obenland. View the logs.

8 years ago

#7 @azaozz
8 years ago

  • Milestone changed from 4.3 to Future Release

Moving out of the 4.3 milestone while waiting for reporter feedback.

#8 @wonderboymusic
8 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

No feedback

Note: See TracTickets for help on using tickets.