Add this function in your theme’s functions.php
function my_enqueue($hook) {
if ('post.php' != $hook ) {
return;
}
wp_enqueue_script('my_custom_script', get_template_directory_uri() . '/js/myscript.js');
}
add_action('admin_enqueue_scripts', 'my_enqueue');`
In myscript.js place this code
jQuery(document).ready(function(){
jQuery('#wp-link-target').prop("checked", true);
})
It worked for me.
Related Posts:
- How to use wpLink without editor?
- Add CSS Class to Link in TinyMCE editor
- Can’t add a class to links in the visual editor since WP 3.1?
- How do I remove or disable “Or link to existing content” in “insert link” dialogue?
- Custom Post Type archive link in WYSIWYG editor
- Default Link for TinyMCE “Add Link”
- How to customize the “Insert/edit link” popup box?
- Add class to all links created by tinyMCE
- Remove the preview link box since 6.0 update
- Displaying Most Recently Edited Post
- WordPress 4.5 Inline Link Toolbar not working on custom wp_editor instance
- tinymce “Link” popup throwing error, not working
- Allow Linking to draft posts from classic editor
- Why is there a link tag with rel “profile” pointing to gmpg.org?
- Forcing reload of editor-style.css
- Initialize TinyMCE editor / visual editor after AJAX insert
- No filter of code on switch from html to visual editor, how?
- How set defaults on wpLink()
- How to modify image editor dialog options on WordPress?
- How to add multiple buttons to TinyMCE?
- Add a class to links in the visual editor (how to get old dialog back)
- Stop certain classes showing up in TinyMCE Advanced Style dropdown
- How to add a class to ul tags created by the WordPress editor Tinymce?
- How can I link to the most recent post in a category?
- Want to have the Post editor remembering the last editing position
- How to splice in wp_links links into the loop?
- WordPress tinymce prints empty P tag and break html format
- Is there an easy way to create a links index page?
- Retrieving all Links from a Post?
- Get Stylesheet To Showup in WP Admin Panel Editor
- Add table controls with wp_editor minimal editor configuration (‘teeny’)
- Getting only the most recent bookmark?
- Plugin that inserts favicon next to links
- Create anchor from Wysiwyg editor
- How can I enable a TINYMCE rich text editor in the admin interface?
- Add table button in editor without Plugin
- wp_get_attachment_link to add title attribute to link tag around image
- Can I generate then display a mixed list of linked and unlinked terms
- Make page tab link to pdf
- How to change server name on WordPress Installation?
- How to prevent a page from being linked in the menu/crossbar
- the_editor() function
- Linking from Menu and a Page to the latest post from a specific category
- Multiple TinyMCE Editors in one Admin Page
- Is there a way to hide WordPress behind a web visible directory?
- Links in nonalphabetic order
- Copy button for anchor link
- My custom link works only on home page
- Is it possible to disable the image alignment options in the post editor?
- How do I get link URLs from the WordPress links backend into an array?
- Is there anyway to use relative link instead of absolute link?
- How to link to local post
- WP Method `get_theme_file_uri()` Doesn’t Seem To Be Working Properly When Used In The Head Section Of A Site
- Moving a wordpress.org website to another domain name?
- How do I make WordPress “Page” link in the top nav bar go to an external URL?
- How to deal with internal links in blog while developing new site in WordPress?
- Alternative to rb-internal-links to implement [intlink tag?
- Highlight archive link on single.php
- Dynamic logo/banner depending on affiliate link
- Allowing style tag in TinyMCE editor
- Send data to Editor before saving the post
- How do i remove all Bit.ly shortened links from site?
- Related posts for a post
- Keyboard shortcut for headings on safari
- Best Browser for Editing Posts
- Converting a hierarchy of off-site web-links to Word-Press
- Link to downloadable excel sheet on website leads to unfinished version of document
- TinyMCE strips off the href tag inside span, if i change from text to visual
- Wordpres Tinymce custom button (Gavick guide)
- How can I automatically display the section link on my one-page Elementor website?
- WordPress 5: prevent link from displaying page title instead of URL
- How to download file without login to wordpress account?
- Disable automatic embed links
- How to add a column into the link manager?
- Link Dont work in first page Hero image
- Getting duplicate homepage links | Even if there is only one page in Dashboard Please Help
- Add Developer Link on Homepage Only
- How to use the WordPress API to get links and scripts in and
- how to link local pages with flags in submenu
- Get youtube link title in post title
- Unwanted Autogenerated Link
- Visual editor popover or placeholder
- List pages including both parent and child pages
- `tinyMCE is not defined` after migrating site to server
- Unable to create hyperlink after WordPress updated
- Anchor doesn’t work if it’s given in the url
- Better code/text editing for posts and pages?
- Remove heading tags on line break
- Link rewrite to https (NOT URL rewrite)
- random characters on links
- Detect what page was linked-from
- link header to homepage (for wp multisite)
- insert link in wordpress editor greyout whole screen?
- permalink and $_GET
- How do I separate my theme’s styles from editor styles?
- What is the right way to code links for WordPress pages?
- pictures does not apeare in posts
- Access the article edit page from the web address bar?
- Is there any way to display the link of a WordPress page without relying in its slug (or full path)?
- Trying to chance my link style