• I am using Advanced Editor Tools v5.9.2 with WordPress 6.5.5 and the Avada Theme v7.11.9. I need to copy a lot of XML from my client’s website and paste it into the WordPress editor (with the Advanced Editor Tools plugin activated). In the linked file, scroll down to the “Config File Format” section to see an example of the XML I need to paste into the WordPress editor. When I paste into the editor, and save the text block, the XML displays correctly on the webpage. BUT, when I edit the pasted text, even one time, all of the HTML tags are removed by the WordPress TinyMCE editor.

    I have figured out a clumsy workaround to fix this problem but I would like to know if there is a setting in Advanced Editor Tools, the Advanced TinyMCE Configuration plugin (which I have installed), or via PHP that I can place in my child theme’s functions.php file to prevent the WordPress TinyMCE editor from stripping out my HTML tags..

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrew Ozz

    (@azaozz)

    If I understand correctly you’re using HTML or XML that was written elsewhere. This would work correctly if pasted in a “Custom HTML” block in the block editor. Also perhaps if pasted in the old Text editor tab of the classic editor.

    However don’t think it is possible to edit such HTML/XML with TinyMCE. It uses contenteditable, meaning that it will always recreate the tags the way the browser interprets them.

    Thread Starter Bill Vallance

    (@bvallance)

    Thanks, Andrew, for the explanation. I tried pasting the XML into the text editor. It works the first time it is saved. BUT, if you edit the XML at a later time, the editor opens in visual mode and strips the HTML tags. I tried the WordPress admin setting to disable launch of the editor in visual mode, but it didn’t work. I didn’t think about using an HTML Block – good suggestion. I’ll give it a try the next time I encounter XML , which I will.

    Plugin Author Andrew Ozz

    (@azaozz)

    if you edit the XML at a later time, the editor opens in visual mode

    It should remember the last mode used but this is not per post, it is the last time the editor was used. Think there were/are plugins that can make this into a per post setting, maybe see if you can find one.

    Yea, thinking the HTML block would be the best choice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.