[wp-trac] [WordPress Trac] #50817: TinyMCE: default_link_target is ignored
WordPress Trac
noreply at wordpress.org
Thu Jul 30 10:56:23 UTC 2020
#50817: TinyMCE: default_link_target is ignored
--------------------------+-----------------------------
Reporter: utoppo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: trunk
Severity: minor | Keywords: needs-patch
Focuses: javascript |
--------------------------+-----------------------------
I use the following filter, to set the default_link_target for TinyMCE to
_blank:
{{{#!php
<?php
function default_link_target_blank($opt) {
$opt['default_link_target'] = "_blank";
return $opt;
}
add_filter( 'tiny_mce_before_init', 'default_link_target_blank');
}}}
The setting itself works. I can access the setting inside a TinyMCE plugin
via the follwing JavaScript-Code:
{{{
editor.on('init', () => {
console.log(editor.getParam('default_link_target'))
})
// output is: ‘_blank’
}}}
The problem is, that the default_link_target-setting is never taken into
account inside the wplink-Plugin of WordPress:
{{{
src/wp-includes/js/tinymce/plugins/wplink/plugin.js
}}}
I have a Bugfix ready on a cloned repository of
https://github.com/WordPress/wordpress-develop
Unfortunately there is the following inside the .gitignore-file of the
repository:
{{{
/src/wp-includes/js
}}}
Is there any other place, where I could commit changes to the JavaScript
code? Did I miss something? How could I create a pull-request on the
github-repository with changed JS-Code?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50817>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list