- This topic has 3 replies, 2 voices, and was last updated 5 years ago by
Elvin.
-
AuthorPosts
-
May 2, 2021 at 5:58 pm #1761031
Mary Pearson
The page of concern is https://kimn.ca/marksold
I am trying to add an HTML page. When we copy and paste the HTML code into the HTML tab of the page, the only thing that shows up is the header. We believe that the HTML is adding extra tags and removing others. Example – my son-in-law (who created the HTML page says):
My code says:
<p role=“alert” id=“errorMsg”></p>Your code says:
<p role=“alert” id=“messageMsg”>
So, it is missing the closing </p> tag.
Then, just before the <script> tag, it has inserted a <p> tag….
So, somehow you have to get WordPress to honour the text you are entering verbatim instead of trying to style it for you.
Also, the <style</style> tags seem to be missing, so the page won’t look right either.
So I thought the problem might be the TinyMCE plugin. I deactivated it but that didn’t change anything. So then I thought I could bypass the WP interference by adding the code directly into PHPMyAdmin, but again, nothing changed. The only thing we see is the header.
Can you tell me please how to “get WordPress to honour the text you are entering verbatim instead of trying to style it for you.”
Many thanks!
May 2, 2021 at 6:28 pm #1761052Elvin
StaffCustomer SupportHi there,
WordPress generally doesn’t do anything to added HTML elements. That change may be from a script.
I’ve checked the page to confirm if it was change and as shown here – https://share.getcloudapp.com/Z4uo2vOg – I believe it kept the intended code which is
<p role=“alert” id=“errorMsg”></p>.I’ve found the style tag as well. https://share.getcloudapp.com/nOuoJgqL
Then, just before the <script> tag, it has inserted a <p> tag….
Yeah that’s tinymce default.
Try these suggestions:
https://stackoverflow.com/questions/17376595/how-can-i-remove-p-tags-that-are-auto-added-within-tinymce
https://stackoverflow.com/questions/52509650/how-to-remove-p-tag-in-tinymce/52511706
https://wordpress.stackexchange.com/questions/191211/wordpress-tinymce-keep-wrapping-p-tags-to-html-codes-when-savingMay 2, 2021 at 6:49 pm #1761057Mary Pearson
Thank you Elvin. After looking at the links you suggest I am now more totally confused than ever. I will forward to my son-in-law and perhaps he will be able to make use of it.
May 2, 2021 at 6:59 pm #1761059Elvin
StaffCustomer SupportThank you Elvin. After looking at the links you suggest I am now more totally confused than ever. I will forward to my son-in-law and perhaps he will be able to make use of it.
If I may suggest:
TinyMCE is pretty much outdated. Consider changing to Block Editor and use the HTML block.
-
AuthorPosts
- You must be logged in to reply to this topic.