Adding HTML code hides/deletes content

  • 27 August 2021
  • 7 replies

Hi, got a weird issue. I added an HTML widget and pasted in HTML code generated by another program. Immediately, all the content in the right pane disappeared. <cue heart attack>

After multiple attempts with various versions of the generated code, it continued to happen the same way. Deleting the HMTL code didn’t help. Luckily, every time I’ve been able to access the Navigator and delete the HTML widget, and after closing the Elementor edit page and then re-opening, everything is fine.

Any ideas what might be the issue on such vague information? :)


7 replies

Userlevel 6
Badge +1

Make sure the HTML code has only what’s required for your purpose, i.e. strip everything else out.
So you don’t need these tags:

  • html
  • head
  • title
  • style (if included in head)
  • body

Also ensure there is no JavaScript in the code.

Hope that helps.

Userlevel 6
Badge +3

Make sure script tags are proper not broken and complete script tags.

Userlevel 6
Badge +3

can  you send code that you pasting in.

Hey Simon and James,


Thanks much for the replies. It does have Javascript in there, but I have no idea if it’s “good” code - I’m only mildly HTML-code knowledgeable and what they have is beyond that.

James, thanks for the offer to look at it, I’ll send it in a message.


Userlevel 6
Badge +3

above is html code, please paste like shown below, uses <script> tags, place ur code in between, as shown below

if (typeof cart == "undefined")

Re-sent via message, as I mentioned it got truncated by the message system. Thanks!


Userlevel 7
Badge +4

@Stephanie H did you find your answer here? If so, please consider clicking “Best answer” to help out others. If you found it elsewhere, please share it here so we can mark your answer as the best one, thanks :)