Hot answers tagged

2

What you have is working perfectly in a clean WordPress installation, using Twenty Seventeen, so it means the problem is the way in which you are minifying your JS or anything else within this specific WordPress installation. Do the usual thing, deactivate all plugins and check again, if the problem is gone activate one by one until you find the one causing ...


1

In wordpress, the editor will support and will be in RTL by default if you install it in an rtl language, for example, if you install wordpress with the hebrew UI the editor will be rtl by default. The problem is if you install the hebrew UI but change your profile to use the English one, in order to still use the editor in rtl mode while using the English ...


1

Here's an easy way to achieve what you wanted: From the edit callback, return a class which extends the ClassicEdit component used with the Classic editor block. And in your block's attributes, make sure content is set (in the question, it's blockValue). Tried and tested working properly: var el = wp.element.createElement; var ClassicEdit; // An instance ...


1

Finally got it running with few pieces of extra buttons too :): <?php $tinymce_options = array('plugins' => "table,lists,link,textcolor,hr", 'toolbar1'=>"fontsizeselect,forecolor,backcolor,bold,italic,underline,strikethrough,alignleft,aligncenter,alignright,alignjustify",'toolbar2'=>"blockquote,hr,table,bullist,numlist,undo,redo,link,unlink"); $...


1

automatically turns pasted image URLs into embedded images Yes, but only for URLs ending with .gif, .jpg, .jpeg and .png. And that conversion is one of the "smart paste" features in TinyMCE — another one is when you select a text and paste an absolute URL (that begins with http or https), the text is automatically converted to a hyperlink (clickable ...


1

(Revised answer) You can use tinymce.DOM.encode() to convert all HTML tags to their entities, e.g. &lt; for < and &gt; for >: var html = tinymce.DOM.encode(e.data.code); Then to preserve trailing white-spaces: html = html.replace(/(^ +| +$)/gm, function(match, p1){ return p1.replace(/ /g, '&nbsp;'); }); And this to convert all line ...


1

Add this code in your theme's functions.php file //wp-content/themes/my-theme/functions.php function bootstrap_classes_tinymce($settings) { $styles = array( array( 'title' => 'None', 'value' => '' ), array( 'title' => 'Table', 'value' => 'table', ), array(...


Only top voted, non community-wiki answers of a minimum length are eligible