wp-tinymce.php 404

My visual editor isn't working on a site after just launching it to a new server. I assumed a permissions issue, but the file itself is set to 644. I tried 755 on it as well and still no go. The directories all the way up are 755. I can access other files in the directory, but not this one file. Any ideas?
Category: Web

Wordpress tinyMCE Keep Wrapping <p> Tags To HTML Codes When Saving

Wordpress tinyMCE keep adding &lt;p&gt; tags when I saved my custom post types in visual mode opened! I had searching for many solutions, but not working. Here is the solution that I found, but this is unable to stop wordpress from adding annoying &lt;p&gt; tags from my html codes: Javascript: &lt;script type="text/javascript"&gt; tinyMCE.init({force_p_newlines : false}); &lt;/script&gt; PHP function tinymce_remove_root_block_tag( $init ) { $init['wpautop'] = false; $init['force_p_newlines'] = false; $init['forced_root_block'] = false; return $init; } add_filter( 'tiny_mce_before_init', 'tinymce_remove_root_block_tag' ); I don't …
Category: Web

wp_editor in widget breaks after save (no buttons and visual tab broken)

My goal is to get wp_editor working in a simple widget which the admin can use to add text content on an admin options page. Here we go in wp-admin/widgets.php everything looks sooo good right. When we try to save... Oh no..... Buttons are gone and the Visual tab no longer works When I look at the HTML it appears as though after updating TinyMCE just decides it doesn't need to load any buttons... Any ideas? Edit: here's the source …
Category: Web

Remove tinyMCE from admin and replace with textarea

I have created a plugin wherein I have a custom post type. I am using post_content for some simple text. I do not need to offer any fancy editing or insertion of data for this field, so I looked for a way to remove the buttons from the tinyMCE editor. I never found a very good solution so I removed the editor from the custom post type supports in the register function. 'supports' =&gt; array('title','revisions','thumbnail'), Then to create an area …
Category: Web

TinyMCE Styles Dropdown not adding html tags other than span

I am trying to add h1,h2 .. in the TinyMCE Styles Dropdown with my other html elements. I have tried the following code, but the problem is it only adds styles if I use span as 'block' value. If I use div, h3, h4, the code doesn't add anything I have searched a lot for the solution but haven't found anything helpful. Could you please tell me how to fix this problem? FYI: I am using wordpress 3.5.1 function my_mce_buttons_2( …
Category: Web

Did Gutenberg block editor change the html in post content during import?

Which HTML is better, pre-Gutenberg or post-Gutenberg? I imported post content from an old and large WP site into a fresh install and new database. Almost 1200 posts along with their meta and related media. The xml file is 15mb. I used the standard wordpress import/export along with a media export [plugin][1] for featured images. The origin site uses tinymce advanced to maintain the classic editor look for the client. Most everything carried over, but in the new setup, the …
Category: Web

TinyMCE HTML Encode Backslash

so my question is similar to the one found here, following the example there i am trying to force Tiny MCE to encode backslashes...... currently all i am doing to test this is setting a break point on the page for the following line tinymce.init( init ); then i run the following in the console init.entities += ",92,#92"; init.entity_encoding = "named"; I see the values update in the init object but my \ is not converted.... not really sure what …
Category: Web

Using TinyMCE fiddle for node filter to add id attribute to anchors

I'd like to edit the code of the anchor-maker in TineMCE so it will paste into the code the following line: &lt;a name="#ANCHOR" id="#ANCHOR"&gt; instead of: &lt;a name="#ANCHOR"&gt; Where do I find a proper file with settings for this stuff? This is my code: &lt;script type="text/javascript"&gt; tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", …
Category: Web

Inline Editing with wp_editor and tinymce (problem with textarea)

I want to use the new inline editing from tinymce with the wp_editor function in wordpress. Here is some info on how to set up tinymce inline editing http://www.tinymce.com/tryit/inline.php The code I am using to call wp_editor is as follows: $editor_settings = array('dfw' =&gt; true,'quicktags' =&gt; false); wp_editor( $postcontent, 'postcontent', $editor_settings ); And in functions.php I have the following to enable inline editing: function mce_inline( $init ) { $init['inline'] = true; return $init; } add_filter('tiny_mce_before_init', 'mce_inline'); The problem here is …
Category: Web

Insert wp_editor on front-end with AJAX?

I'm trying to insert a wp_editor() into a page on the front-end with AJAX. The code I have right now inserts the wp_editor elements and the needed JavaScript and CSS files, but none of the settings I used initially in wp_editor() are used when creating this TinyMCE element. How do I pass the $settings set in PHP into the dynamically created TinyMCE instance? I found an old question that seems to answer my question, but I don't understand how it …
Category: Web

How do I include a TinyMCE editor in the frontend?

I am trying to add a TinyMCE editor in my frontend from where users can post but have had no luck so far. Here is the code: PHP: add_action('wp_print_scripts', 'my_enqueue_scripts'); function my_enqueue_scripts() { wp_enqueue_script( 'tiny_mce' ); if (function_exists('wp_tiny_mce')) wp_tiny_mce(); } Javascript: jQuery(document).ready(function(){ tinyMCE.init({ mode : "textareas", theme : "simple", /*plugins : "autolink, lists, spellchecker, style, layer, table, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, xhtmlxtras, template",*/ editor_selector :"editor" }); …
Category: Web

Adding a Media Button to the WordPress Content Editor

So i'm trying to add a button over the text editor which on pressed lets the user paste in a youtube link which is then covered in shortcode something like this [code]youtube.com[/code]. Following this guide lets me show the button however pressing the button does northing. nothing afterwards pops up. See screenshots for clarification. And here's my code: jQuery(function($) { $(document).ready(function(){ $('#insert-my-media').click(open_media_window); }); function open_media_window() { if (this.window === undefined) { this.window = wp.media({ title: 'Insert a media', library: {type: …
Category: Web

Is it possible to disable the image alignment options in the post editor?

By default, when you insert an image into a post, it has some image alignment options (see below). In my theme I want every image to be full width. Of course, it's easy for me to change the front-end display of the images. But--in terms of usability--I don't want to cause the user to think that they are able to change the alignment. Is it possible to disable those alignment options?
Category: Web

How to apply padding to TinyMCE editor?

I am using the following in functions.php... function wpdocs_theme_add_editor_styles() { add_editor_style( array( 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css', 'assets/css/editor.css' ) ); } add_action( 'admin_init', 'wpdocs_theme_add_editor_styles' ); ... to apply the Bootstrap CSS to my WordPress post editor. Bootstrap comes in nicely. But this now results in the removal of any padding from the post editor. File editor.css contains padding: 40px !important; in turn applied to a range of CSS classes... the padding is not getting applied... .mce-panel, .mce-edit-area, .mce-container, .mce-panel, .mce-stack-layout-item, .wp-editor-container .wp-editor-area, .wp-editor-container, .wp-editor-area …
Category: Web

How to dynamically generate wordpress editor on frontend?

I want to initialize the wordpress editor dynamically on frontend. I have tried to include the following scripts: wp_enqueue_script('editor'); wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); Then to init the editor like this: tinymce.init({ mode : 'specific_textareas', editor_selector :'tinymce' }); But it does not work. Any ideas?
Category: Web

DOM reference to TinyMCE editor element (button)

I guess this should be a very simple question, but I'm not too familiar with overall functioning of Wordpress / TinyMCE so I'm struggling: I've added a custom button to TinyMCE and need some kind of reference to a corresponding DOM element that would enable me to set a function handler for the 'click' event. Every click should dynamically change some other parts of the TinyMCE editor so I also need to refresh ('reflow'?) the view somehow. Among answers to …
Category: Web

Equation input with preview in classic editor

I use WordPress as a headless CMS, and my frontend is made with React. There's no theme or live preview. I'm looking for a plugin to add/edit and preview equations (LaTeX) in the classic editor. This is an example of what I want, but with CKEditor: https://jsfiddle.net/isaul32/3wjrkLdv/ Most of the plugins I find are outdated, and some of them like KaTeX (which I'm planning to use its js library for frontend) only support live preview in gutenberg blocks. The reason …
Category: Web

`tinyMCE is not defined` after migrating site to server

After migrating site tinyMCE (text editor) top bar have disappeared &amp; text color have changed to black, I am getting 4 errors in concole and below is a snapshot of it. I am using WordPress version: 4.2.2 I have already tried disabling all the plugins &amp; re-uploaded wp-include files. There are a lots of links out there on web regarding this issue but nothing seems to work for me.
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.