Questions tagged [html-editor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
543 views

Wordpress adds <br> and <p> tags into HTML blocks after saving

In my wordpress page I have html Blocks with html, css and javascript. When I save the page Wordpress keeps adding <br /> and <p> tags on each line making the JS and CSS invalid. It ...
user3037960's user avatar
0 votes
0 answers
138 views

Can't have two simultaneous charts using Apex Charts

My problem is pretty simple: I have an HTML code block with an AJAX query that builds a perfectly fine chart using Apex Charts. When I duplicate this HTML block, it doesn't display one of the charts, ...
user38680's user avatar
1 vote
2 answers
246 views

How Do I Add HTML Support to the Additional Category Description Field?

I created an additional description field for categories, but what I write in html is saved in MSQL without html, how can I add HTML support to this field? For example, I write a statement like this: &...
Murat Dinc's user avatar
0 votes
0 answers
96 views

How to prevent Wordpress CodeEditor adding fake </div> closing tags that corrupt the page?

I'm trying to make some trivial HTML changes to a page's source - this should take 10 seconds - but every time I save anything in the code-editor, Wordpress corrupts it by inserting an increasing ...
Adam's user avatar
  • 101
1 vote
0 answers
212 views

Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]

I spend a lot of time developing technical content that revolves around software and network engineering. I used to do some content creation and blogging on this topic as well as creating ...
ylluminate's user avatar
0 votes
1 answer
1k views

Why does the custom HTML block not preserve the HTML characters?

For example it seems that the plain single-quote character ' (&#x27;) is converted to the right ones ’ (&#8217;) in the HTML page output. I understand the reason for this in regular Gutenberg ...
Ooker's user avatar
  • 330
0 votes
3 answers
151 views

How to add custom HTML tags in the visual mode via keyboard only?

Let say I want to insert different inline formatting texts. I can do that by opening the HTML mode, but is there a way to do it directly in the visual mode? For example, if I type span.a in a ...
Ooker's user avatar
  • 330
0 votes
1 answer
667 views

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 ...
Kevin's user avatar
  • 15
1 vote
0 answers
23 views

Text Editor Tags

Hello Wordpress StackExchange, I'm embarrassed by what is probably a rookie question, but here it is: I migrated and took over a website that a friend hired another developer to create, but I don't ...
Eddy Kawira's user avatar
1 vote
0 answers
51 views

How to Add Custom Button to Text(HTML) Editor and NOT Visual Editor

I followed this tutorial which is adding a custom button into Visual Editor as it is supposed to. But this is not adding the button into the Text(HTML) Editor. Can you please let me know how I can ...
Behseini's user avatar
  • 525
4 votes
2 answers
1k views

serialize_blocks breaking html tags in content

I'm trying to inject some data into blocks via PHP but am running into trouble with parse_blocks/serialize_blocks breaking my content I'm using the default 2020 theme and have no plugins installed ...
michael's user avatar
  • 141
1 vote
0 answers
202 views

Wordpress editor not creating <p></p> tags properly in tables

Wordpress isn't creating paragraph tags properly for paragraphs in a table. For example, the following in the Wordpress text editor: <table style="border-collapse: collapse; width: 100%;"> <...
dsdffds's user avatar
  • 11
0 votes
0 answers
240 views

Block editor: content resets to the previous state in "Edit as HTML" by clicking somewhere outside of the editing window

When I'm adding my custom block and then trying to edit it in "Edit as HTML" mode, any changes reset to the previous state every time when I click outside the editing window. Let say default HTML in ...
Eugene Lavrinenkov's user avatar
1 vote
0 answers
138 views

Product Custom Fields with HTML and JS

I have a custom textarea filed for the product page. woocommerce_wp_textarea_input( array( 'id' => '_custom_product_calc', 'label' => __('Test', 'woocommerce') ) ); $...
Alexander Goroshev's user avatar
6 votes
2 answers
1k views

Disable the Code View in the content editor?

Is there a way to disable JUST the Code editor view in the content editor? I have a bunch of clients who fancy themselves developers and keep messing up their own pages because they really have no ...
Vanderbeam's user avatar
1 vote
1 answer
480 views

Can `<style>` and `<script>` tags be used in the HTML editor?

I understand this is so stupid, because absolutely there should be an answer out there, but I can't find it myself. In short, can you use <style> and <script> tags in the HTML editor, ...
Ooker's user avatar
  • 330
0 votes
1 answer
284 views

how can default_content filter tell if content will load in block editor or classic editor?

In short, I want to use the default_content filter to return slightly different content depending on if it will be used in the block editor or not (eg. the quicktags or tinymce editor) - is there any ...
Jesse Norell's user avatar
1 vote
0 answers
439 views

Removing line breaks when in text view with wp_editor

While working on a custom plugin, I needed to add the wp_editor in the admin to let the user add its own content. I want the user to be able to write custom rich texts with the "Visual" editor mode ...
fraxool's user avatar
  • 121
1 vote
0 answers
220 views

Visual editor keeps stripping my <a> tags

My first post, please forgive me if I'm doing it wrong. For some reason when switching to the visual editor WordPress will strip out my a tags. "Don't use the visual editor" isn't an option, I'm ...
Sarah Morrow's user avatar
1 vote
0 answers
148 views

How to set wp_editor to be email friendly?

I am sending emails via wp_mail() using a text/html header. So i need html formatted content. I want to use wp_editor() to edit my custom email template options. It has a Visual and Text tab for ...
jonnyK's user avatar
  • 91
0 votes
1 answer
159 views

How do I prevent Wordpress from eating my code?

I'm writing a guide and putting code examples. If I use the visual editor the code indentation is lost. It will also take some code and strip it out. If I use the text editor I can't ever switch to ...
1.21 gigawatts's user avatar
1 vote
1 answer
3k views

Gutenberg; Rich Text/HTML for Metadata Textarea Control in Back End

I've properly registered a Gutenberg block that consists of a textarea control to store metadata for a post. In the old days, I simply rendered a wp_editor on the edit-form-advanced hook which had ...
jdp's user avatar
  • 343
-1 votes
1 answer
859 views

image overlay on image not working in wordpress, but works in "normal html editors"

i've got a series of photos, with an overlay, it seems to work fine in an html editor, but then when i switch it over to wordpress (wp bakery html block) that overlay doesn't seem to work Any idea's? ...
yazn's user avatar
  • 1
0 votes
1 answer
901 views

How can a TinyMCE modal return formatted/visual text?

I am trying to customize the behavior of an editor button in a plugin. On click, it opens a modal where the user can input some text. On confirmation, I want to wrap this text into code tags. But I ...
Florian Walther's user avatar
0 votes
0 answers
76 views

Classic TinyMCE messing up only Contributor's HTML

I use a plugin that loads pre-defined HTML for my posts. I don't need the Visual editor, so I've disable it for everybody. Also, I want TinyMCE not to mess with my code. Nothing, no auto formatting ...
Henrique Barcelos's user avatar
0 votes
1 answer
2k views

Locating the HTML piece of code in wordpress

I am new to wordpress and I am currently working on modifying a wordpress built website. I am trying to find the exact HTML location of the web page using inspect options in chrome and then trying to ...
MJ2410's user avatar
  • 127
5 votes
4 answers
3k views

Stop WordPress From Removing HTML Comments In Content

Whenever I switch from the visual editor to the text (HTML) editor and put an HTML comment in the code, e.g. <!-- this is a comment-->, WordPress removes it, either after saving the change or ...
j08691's user avatar
  • 765
1 vote
1 answer
195 views

How to add JavaScript code on WordPress properly?

In the code editor, pasting: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> var words = []; words.push('vocabulary'); ...
Ooker's user avatar
  • 330
1 vote
1 answer
226 views

Inline Style attribute getting stripped off

I am trying to style a particular section of a blog post using the WordPress editor in HTML mode. <div style="background: red;"> Special section </div> The works fine. But when I add ...
Nigel's user avatar
  • 161
0 votes
1 answer
59 views

Problem with some keys when editing HTML in wordpress "text" editor

My wordpress 4.9 editor for posts has two editor views Visual Text I am mostly using the text view and often adding shortcuts. Sometimes I directly add HTML5 code, e.g. for tables. However, these ...
Craig  Hicks's user avatar
1 vote
1 answer
904 views

Placeholder in HTML editor text area?

I am trying to make a placeholder appear on the default html editor on a specific post type. The code looks like this: add_filter('the_editor','add_placeholder_event'); function add_placeholder_event(...
jockebq's user avatar
  • 463
0 votes
2 answers
34 views

Adding Html in text editor automagically adds undesirable paragraphs when publishing

When I write pages, I want to code my own HTML to accomplish the design that I get. For that I use "Text" editor view instead of "Visual" editor. I do not switch between them and when publishing the ...
kitimenpolku's user avatar
0 votes
2 answers
39 views

How to create different gallery-types and let the editor choose between them?

What I want to achieve The editor should be able to add galleries via the native wordpress way and choose between 3 different gallery types. These 3 types should all have their custom code-output, ...
kater louis's user avatar
5 votes
1 answer
21k views

How to replace the content of tinyMCE editor in both text and visual mode using jQuery?

I have added a button beside the Add Media button in WordPress' post editor. Its called Insert Content button. When this button is pressed, it should send a content, either plain text or HTML, into ...
kosinix's user avatar
  • 1,454
-2 votes
1 answer
999 views

Add Custom CSS Class in Child Theme [closed]

On my blog, I have different heading styles which I had defined in each post using HTML of the Wordpress Editor. Since one heading style appears frequently I would like to add a custom CSS class to my ...
conpertura's user avatar
0 votes
1 answer
3k views

Remove TEXT EDITOR form page [duplicate]

I'm looking for a way to remove text editor from page because i'm using Beaver Builder plugin (for building my pages). like you see in the picture bellow, i have 2 tabs. I want to remove text editor ...
Samuel's user avatar
  • 344
-1 votes
1 answer
39 views

Which subset of html does WordPress support?

I am in the middle of writing plugin for WordPress which would cross-post articles from wordpress to different places. I need to know what html-code can be produced by wordpress editor... or in ...
noisy's user avatar
  • 107
1 vote
0 answers
34 views

How to process html editor whole content of a single post

Given that I'm new about WordPress, I was not able to find any plugin implementing search & replace functionality for the html editor of a single post. Is there any technical difficulty in ...
mmj's user avatar
  • 113
0 votes
0 answers
488 views

Why is every single HTML tag being stripped out of liveblog entries?

I have variously been using Livepress and the Automattic/Wordpress VIP Liveblog plugin as a live-blogging solution. However, I have run into an issue that does not seem specific to either plugin but ...
Edmund Heaphy's user avatar
3 votes
2 answers
4k views

strip only specific tags (like <p>), but keep other tags (like <br/>)

I know it's easy to disable Wordpress from adding both p and br tags with: remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); but I want Wordpress to keep adding &...
vyperlook's user avatar
  • 167
1 vote
1 answer
4k views

Disable TinyMCE Table formatting width/height

Hi there I want to disable automatic formatting of table/td/tr widths and heights in WordPress TinyMCE. I create the table, literally type the data in (not copying it from word or anything like that) ...
RRowan's user avatar
  • 113
0 votes
1 answer
313 views

Callback function quicktags that uses variable in start tag

I am trying to make a callback function that returns on click of a quick tag wordpress button dinamical generated variables inside the tags. Something like QTags.addButton( 'eg_wrap', 'WRAP ARROWND',...
Adrian's user avatar
  • 113
0 votes
2 answers
809 views

What is the correct syntax to append a URL using a shortcode for an iframe?

I need to iframe a series of content on our site. I need to pass on the the user information via a URL - vendor request. I have tons of shortcodes that display the username. It works fine. But ...
STing's user avatar
  • 591
3 votes
1 answer
42 views

Where can I find the code how wordpress parses a post?

When you write a post in text section instead of visual WordPress will work with HTML. But when you save the post and preview it, it will transform your HTML-like text into real HTML with proper ...
Jonathan's user avatar
  • 133
0 votes
0 answers
416 views

My Wordpress editor deletes all characters after emoji - how can I fix this?

Here's my issue: I have an Instagram post that I want to embed. I go to Instagram, I get the embed code, which includes emoji, I paste it into the WP editor on a new post (note that I am on the "text" ...
Eric's user avatar
  • 282
3 votes
4 answers
6k views

Prevent Wordpress from adding linebreaks to javascript embedded in a page

On a page in Wordpress, If I enter the following code: var r='<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>'; it is rendered in the ...
TecBrat's user avatar
  • 153
-1 votes
1 answer
883 views

wordpress not saving form code in code editor

I'm sure this question has been asked a thousand times, but when I search, or post a question with the above title, no answer is presented. A few weeks ago, I was able to save Paypal form code into ...
Steve's user avatar
  • 1,677
1 vote
1 answer
2k views

Prevent WordPress from messing my HTML

Is there a way to prevent WP from modifying my perfectly fine HTML? When writing content of a page, I'm writing a list as <ol> <li>Paragraph 1 : text Some more text</li> <...
Yanick Rochon's user avatar
1 vote
2 answers
2k views

Visual/Text tabs in wp editor Not Showing

I have a wordpress website that i have added custom meta boxes to the post. Custom meta boxes have an editor using wp_editor(), but the editor is refusing to show the visual/text tabs on the editor ...
Rizal Ibnu's user avatar
1 vote
1 answer
813 views

Selectively remove empty line after line change

In WP post editor, how can I change lines without adding an empty line? I try to post this One line Second line third line But it always shows like this One line Second line Third line PS: I ...
IXN's user avatar
  • 906