I have bootstrap grid in some pages, which I've made visibale in the editor by styling in editor styles. Is there a way to make the column div not removable in visual editor, kind of like how you can't delete a table cell with a backspace. So that when a client deletes the text in a div and keeps pressing the backspace it wont delete the div itself? However I do want the code to be editable when you switch …
I am running WP Multisite in version 4.8 I have a site in the network that lost the visual editor toolbar a ways back (not exactly sure when it disappeared). When you go to Text view mode the content and markup is entirely visible. When you go to Visual view mode the content is there but white text on white background. Plus, the visual editor toolbar is missing all together. I am running 18 plugins on this site -- none …
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: …
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?
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 …
wp editor was replacing br tag with p tag. not all the solutions here worked. It was causing problem with design. So i disabled wpautop with below code.... remove_filter( 'the_content', 'wpautop' ); Forgot to mentioned that excerpt disappears if used.... remove_filter( 'the_excerpt', 'wpautop' ); However, the problem still persist for excerpt. In excerpt adding single br works but two br becomes p In order to style p of excerpt i am using below filter... add_filter( "the_excerpt", "add_class_to_excerpt" ); function add_class_to_excerpt( …
I want to allow code inside a textarea to write code with PHP, SQL or HTML... What i want to do is create an element inside the Visual Composer where I can put some code to show it as i write it on my posts. Here you can find the type values: https://kb.wpbakery.com/docs/inner-api/vc_map/ But no one of these works for me. There is a proper way to do that? array( "type" => "textarea_html", "heading" => esc_html__("Text", "js_composer"), "param_name" => "text_code_snippet", …
I don't know why when I'm using "Enter", that add &nbsp; in Pages/Posts Editor. That doesn't matter, but on my website, when I look the code &nbsp; makes this code : <p> � </p> and � appears on my website... How can I change that to simple code : <p> </p>
I've spent about 3 hours trying out various functions to figure out why the newline characters are being removed every time I save. How do I figure out why is wordpress suddenly stripping away newline characters? I have not installed any plugins. How can I get newline characters to show up on my site without converting all blocks to HTML and modifying everything in code?
After the update of WordPress 4.9.6, I got a very strange issue that I am not able to write anything in WordPress editor in visual mode. When I'm trying to switch from text to visual I am getting this span code instead of text. <span style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" data-mce-type="bookmark" class="mce_SELRES_start"></span> Can anyone help me out with this issue? I am not able to write anything.
I am trying to add schema microdata to a wordpress website. I have tried to insert some microdata directly in the wp editor (text mode) but every time i save the page it does not save the code. I tried a few plugins but when I check with the structured testing tool it doesn't seem like they are working. I generated the microdata using this tool, but I am not able to edit the html. Can I do it via …
What is the best way to analyze existing site fully built on Gutenberg Blocks and inspect intersection of existing blocks structure and it’s inner blocks combination for all pages? Context: Imagine that instance have: ~100 landing pages and СPTs(not just blog posts) that built using core block, custom and some vendor blocks. each page using about 150 blocks (according on Query Monitor -> Blocks counter) no components at all: there are a huge blocks fragmentation in components/layouts, like you are …
Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. <div> <a href="http://somewhere/"> <h4>Some heading</h4> <img src="http://somewhere/some-img.jpg" alt="Some image" /> </a> </div> While I can enter this in the text editor it causes some strange behavior: The code above will be transformed into this HTML code: <p>Some intro text.</p> <div> <a href="http://somewhere/"></p> <h4>Some heading</h4> <p><img src="http://somewhere/some-img.jpg" alt="Some …
I'm using visual editor on front end. When clicking the Add/insert link button, it displays following By clicking Link options icon, the following popup appears Is it possible to directly open the above popup by clicking on the Insert link button from the editor?
As mentioned in the title, the TinyMCE editor of WordPress cuts off the href tag that I have inside the span tag. Below is the code i use <h5> <a href="#" target="_blank" rel="noopener noreferrer"> <i class="fa fa-map-marker" aria-hidden="true"></i> Find us</a> <span class="icon-right"><a href="https://testsite.com/test-gallery/" target="_blank" rel="noopener noreferrer"> <i class="fas fa-images" aria-hidden="true"></i> </a> </span> </h5> So every time I switch from text to visual and then back to text, this is the result of the code: <h5> <a href="#" target="_blank" rel="noopener"> <i …
This is pretty much an exact duplicate of: How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5? and HTML5, WordPress and Tiny MCE issue - wrapping anchor tag around div results in funky output My problem is that the suggested solution (tiny_mce_before_init filter) doesn't seem to solve my problem. I have HTML that looks like this: <a href="#"> <img src="path/to/file.jpg" /> <p>Some amazing descriptive text</p> </a> The is perfectly legal in HTML5. However, …
How is it possible to add a custom button to the visual editor TinyMCE, Version 4? Currently I found this q&a with a little bit hints to the topic, but not a solution or a how to. But I can't find a tutorial, documentation, q&a for the topic to add a custom button to the TinyMCE version 4, include in WordPress since version 3.9-beta1. Goal
Is there a method to force the refresh of editor-style.css, when I change manually the stylesheet for the TinyMCE editor? Modification doesn't show immediately but they will be cached in the admin side of administration backend. For example like this: editor-style.css?ver=3393201
Pre-formatted text in the Visual Editor is not behaving like I'm used to. I've got an old installation (3.2.1), and when create pre-formatted text, all the line-breaks and spacing is preserved. In the latest version (3.3.1), the line breaks are interpreted as new paragraphs, and the code is broken across those paragraphs, leading spaces removed. Process: Copy code from text editor. Click on the "New Post" link. Choose "Preformatted" from the format menu. Paste (ctrl-v). 3.2.1 - Correctly formatted code …