Enable Visual Editor In Comments On CPT Edit Page
Enable Visual Editor In Comments On CPT Edit Page
Enable Visual Editor In Comments On CPT Edit Page
addMenuItem() adds to tinymce’s toolbar, which isn’t used by WP by default, and uses context to add to the particular (sub)menu. You’re adding a MenuButton, and you can access the button through the editor’s buttons array, keyed by the button name: add_action( ‘admin_print_footer_scripts’, function () { ?> <script type=”text/javascript”> jQuery(function ($) { tinymce.on(‘SetupEditor’, function (editor) … Read more
Yes, there is very well a way to disable these formatting shortcuts. You can do so by using this simple little piece of PHP code. <?php function disable_mce_wptextpattern( $opt ) { if ( isset( $opt[‘plugins’] ) && $opt[‘plugins’] ) { $opt[‘plugins’] = explode( ‘,’, $opt[‘plugins’] ); $opt[‘plugins’] = array_diff( $opt[‘plugins’] , array( ‘wptextpattern’ ) ); … Read more
I think theme_advanced_buttons1, theme_advanced_buttons2 etc were part of the TinyMCE advanced theme which is no longer available in TinyMCE 4. WordPress 4.9.7 is using TinyMCE version 4.7.11. The two rows of controls are now referred to with: mce_buttons mce_buttons_2 Here is a good example, taken from https://www.kevinleary.net/customizing-tinymce-wysiwyg-editor-wordpress/ which allows easy customisation of the buttons on … Read more
Editor styles work much differently in the block editor. This is because the content in the previous editor was loaded in an iframe, so you could use a stylesheet isolated from the rest of the admin, and do things like use the body selector to change the font in the editor. The content in block … Read more
You can either create a plugin or a child theme. Since the black background on your site is most likely coming from a theme, a child theme seems like a good fit here – so if you ever changed your theme, the black background in the Editor would also go away. To create a child … Read more
WordPress does not automatically convert URLs to hyperlinks.
I had exactly same issue with Visual Editor but my site was working on port 80. This is what I did : Edited wp-config.php and added the following : define( ‘CONCATENATE_SCRIPTS’, false ); and everything worked fine. Additionally you can check if wp-includes/js/tinymce/wp-tinymce.js.gz file exists or not. If not, then upload it via FTP
It’s not easy to trace trough the code behind [vc_single_image], because for start it uses the extract, that’s not recommended in WordPress or PHP in general. The image attribute value is stripped for non-integers into the $img_id variable. With your setup, there’s a call to wpb_getImageBySize( array( ‘attach_id’ => $img_id, … ), that seems to … Read more
We can simplify the mime type checks, with the following boolean functions: wp_attachment_is( ‘image’, $id ) wp_attachment_is( ‘video’, $id ) wp_attachment_is( ‘audio’, $id ) where $id is the attachment ID. The attachment’s ID is actually one of the input arguments for the media_send_to_editor filter callback. We also have: wp_attachment_is_image( $id ) that’s a wrapper for … Read more