[wp-trac] [WordPress Trac] #41590: Original TinyMCE "link" plugin should be added in Core
WordPress Trac
noreply at wordpress.org
Thu Apr 1 20:24:27 UTC 2021
#41590: Original TinyMCE "link" plugin should be added in Core
-------------------------+---------------------
Reporter: turtlepod | Owner: azaozz
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.9
Component: TinyMCE | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses:
-------------------------+---------------------
Comment (by danielbachhuber):
For the next person that comes across this...
I ran into the problem of `wplink` not working when I mounted an editor
instance into a Vue component. Fortunately, swapping in `link` worked just
fine.
Switching the plugins was all that was required:
{{{
add_filter(
'teeny_mce_plugin',
function ( $plugins, $editor_id ) {
$key = array_search( 'wplink', $plugins, true );
if ( false !== $key ) {
unset( $plugins[ $key ] );
$plugins[] = 'link';
}
return $plugins;
},
10,
2
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41590#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list