Redactor: Adding target="_blank" to links - redactor

Redactor is a neat WYSIWYG JavaScript-based editor.
What is the proper way to add target="_blank" to all links created using the Redactor editor?

As of Redactor 1.2.5 it is now possible to simply set pasteLinkTarget in Redactor's settings when instantiating the editor:
https://imperavi.com/redactor/docs/settings/paste/#setting-pasteLinkTarget
This allows you to ensure that all links pasted or entered into the editor open in a new window.

Make sure the "Open link in new tab" is checked when inserting a link.

Related

Wordpress - How to add advanced TinyMCE WYSIWYG editor to a textarea box in custom page, not meta box

I have a custom page, php code.
I have a regular textarea which is not meta box.
I would like to add the TinyMCE editor to in the textarea box.
I install the Advanced TinyMCE, but I did not know how to add it so it will be shown in the textarea.
I did not see the TinyMCE also it the regular Wordpress post.
Is there a simple tutorial that explain it?
Thanks.
The function you are looking for is wp_editor(). For more information you should refer to the documentation.

Pop-up text on image click WordPress

I am designing a wordpress site for a friend. He wants the bio text to appear after clicking on necessary image. I noticed this is straight forward with Elementor Pro. I want to keep things free for him at the mo.
I am running the Astra theme with basic Elementor. I also know how to code so if you think this is a custom css job then let me know the work around. (I'm brand new to WP)
Many thanks
Try adding an onclick event to the image and write some java script to add text where you want or may be enable a hidden textarea ??
You can check this link below for reference
How do I add a .click() event to an image?

Wordpress PrettyPhoto Gallery from link

I want to have a link that opens a prettyphoto gallery. I am using Wordpress with the Visual Bakery plugin as an editor.
I found if I do this...
<a class="prettyphoto" href="https://paradisocommunities.com/wp-content/uploads/2018/11/Heirloom-LegacyPointe32.jpg" data-rel="prettyPhoto[rel-17-696085417]">Link Text or Image</a>
...it will show use the prettyphoto popup window but there will not be a gallery. You can see this work if you click the Inspire button on this page: https://paradisocommunities.com/model/the-heirloom/
Does anyone know how to make this link a gallery?
The shortcode for an image grid gallery in Visual Composer is:
[vc_gallery type="image_grid" images="1017,1016,1015,1014,1013,1012,1011,1010" img_size="full"]
Is it possible to use these numbers to make it a gallery or just the file names?
You should be able to achieve that by adding one more attribute to the link.
rel="prettyPhoto[pp_gal]"
This is from discussion on their official support forum:
https://wordpress.org/support/topic/go-to-prev-and-next-photo-in-lightbox-view/#post-4528237

Having trouble in embedded post in Joomla 3.3.6

I'm having a problem in including embedded post in a Joomla! article. I'm using the TinyMCE editor.
Steps I have followed :
In Text Filter Settings for Super User - No filtering
In TinyMCE settings - remove script and Iframe tag from "Prohibited Elements".
I'm not able to add Pinterest code:
<a data-pin-do="embedPin" data-pin-width="medium" href="https://uk.pinterest.com/pin/dfg/"></a>
It's likely that the code is getting stripped out because the link is not wrapped around any text. You could possibly add inside the link. However, I would suggest using the "None" editor when adding embed code to your posts. I use Switch Editor to quickly change editors.
Switch to "None"
Add the embed code
Save the article
Switch back to your favorite WYSIWYG editor to edit other articles

WordPress 3.2: Add TinyMCE Buttons to HTML Editing in press-this.php

When I choose "HTML" (instead of "Visual") for the editor in press-this.php I want the TinyMCE buttons to show up like they do when adding/editing a post via post.php.
For example, here's a clipped screen shot of the buttons available in post.php when "HTML" is active:
How do I get those buttons to show when using press-this.php?
I think this has to be a simple change but I haven't found a simple answer. I haven't written any plugins before so if that's the solution I'd like some pointers.
Using "HTML" mode in WordPress (whether you are in press-this or posts or pages) is mutually exclusive with having the TimeMCE buttons showing up. Clicking "Visual" puts you in TinyMCE mode. Clicking "HTML" turns off TinyMCE mode.
TinyMCE helps you write HTML even if you don't know how to write HTML (clicking the B button basically wraps the text you have selected with a <strong></strong> tag pair) . If you don't know HTML or you want an editor to help you write it faster, use "Visual". If you want to write the HTML yourself or you want to tweak the HTML output of TinyMCE, then use "HTML".
I am not that much into WordPress, but here is a very neat HowTo of Moxiecode (the enterprise behind tinymce) which decribes how to write an own plugin (it is not that difficult).

Resources