Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#33264 closed defect (bug) (fixed)

WPLinkPreview only works in the first editor instance

Reported by: iseulde's profile iseulde Owned by: iseulde's profile iseulde
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.3
Component: TinyMCE Keywords: has-patch commit
Focuses: Cc:

Description

It should be set up outside the plugin callback, and each editor should have its own postrender callback.

Attachments (1)

33264.patch (5.0 KB) - added by iseulde 10 years ago.

Download all attachments as: .zip

Change History (9)

#1 @iseulde
10 years ago

  • Keywords has-patch added

Here's a patch that also fixes some other issues, but probably better to do this in steps.
https://core.trac.wordpress.org/attachment/ticket/32604/32604.15.patch

  • Fixes this issue.
  • Adds some basic tests.
  • Always trim the middle and don't set a character limit for the URL. This can be trimmed in CSS.
  • If the URL is just a hash or query, don't link it.

Todo: Relative URLs should be corrected.

@iseulde
10 years ago

#2 @iseulde
10 years ago

Above patch uses the editor.addButton method instead. With that we can add some editor specific settings like onPostRender.

#3 @obenland
10 years ago

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

This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.


10 years ago

#5 @azaozz
10 years ago

  • Keywords commit added

33264.patch works well.

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


10 years ago

#7 @ocean90
10 years ago

33264.patch looks good and works with three editors on one page.

#8 @iseulde
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 33584:

TinyMCE: wplink: fix WPLinkPreview for multiple editors

Fixes #33264.

Note: See TracTickets for help on using tickets.