Embedding code snippets in posts with indentation
Embedding code snippets in posts with indentation
Embedding code snippets in posts with indentation
It’s with the trailing semicolon. Not without, maybe that’s the problem? edit: also the question is quite hard to understand. Do you add those s by hand or is the editor adding them even though you don’t want them or what?
Unable to create hyperlink after WordPress updated
Plugin Error on activating
I found out myself. I had to call media_upload_header(); in the Iframe and trigger the following javascript: var html=”stuff I want to return to editor”; var win = window.dialogArguments || opener || parent || top; win.send_to_editor(html); I have no Idea how, but this works.
Can’t really think of a reason for the behaviour, maybe it is just a bug in the theme, of course I can’t say anything specific without knowing the code. But you should be able get around it by making use of the wp_default_editor hook and explicitly set the type of editor you want to show … Read more
There are a number of problems: The tiny_mce_before_init filter does not affect the TinyMCE editor that VC instantiates for parameters with name == ‘content’ and type == ‘content_html’. VC gets the TinyMCE HTML markup in a separate AJAX request. The editor’s instantiation does not benefit from the tinyMCEPreInit inline JavaScript array that the filter affects. … Read more
I don’t think this is doable on the default visual editor. You can try one of the plugin solutions out there. The most popular ones are: https://wordpress.org/plugins/beaver-builder-lite-version/ (freemium) Visual Composer (careful seem there’s an issue with 4.5) https://wordpress.org/plugins/tinymce-advanced/screenshots/ (just make easier to add HTML elements) One other approach to solve the problem is for you … Read more
Have you tried another editor? You could try CKEeditor, according to some it does not mess with the code indents. https://wordpress.org/plugins/ckeditor-for-wordpress/
By default TinyMCE, the (visual) editor of WordPress, strips schema microdata from input. There are plugins (example) that will prevent this behaviour. Or you can do it yourself by adding this snippet to your functions.php (docs): function wpse238918_allow_schema ($in) { if(!empty($in[‘extended_valid_elements’])) $in[‘extended_valid_elements’] .= ‘,’; $in[‘extended_valid_elements’] .= ‘@[id|class|style|title|itemscope|itemtype|itemprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]’; return $in; } add_filter(‘tiny_mce_before_init’, ‘wpse238918_allow_schema’ );