Using HTML component

I am adding a new web page to my website and this new page is using an HTML component.

When I click on the Inspector there is code there already that I remove. I paste the new HTML code in and immediately I get an error screen that can only be dismissed by closing Elements.

What am I doing wrong?

Hi @irishchristo,

Sorry that’s happening. An error you can only get out of by quitting isn’t expected, so I’d like to look at it.

A couple of things that often trip HTML pasted into Elements:

  • unclosed tags or quotes
  • {{ … }} or @something in the snippet, which Elements treats as its own template language

If you can, try a tiny snippet first (<p>Hello</p>) to see if that sticks.

If it still errors, grab a screenshot of the error screen and drop it here.

Cheers

I have created several HTML components but after the first one (Single Results) and none will work.

I tried Hello and that failed too.

Hi @irishchristo,

A screenshot of that error would help. Even better, use Help → Upload to Support so we can take a closer look at the project.

Cheers

@irishchristo I wonder if you are making the same mistake I made. You need to create a new HTML for each code block that you wish to insert. Only use an existing one if you want exactly the same code.

You can name the HTML blocks in the title section:

What I haven’t found out how to do is to delete an unwanted HTML block.

Thank you. It is interesting as I asked Claude AI about this and got a reply saying that there is a bug in the software so I passed this on to Rapidweaver

If ou mean delete a custom component HTML then just right click. If you mean the code within block just highlight it and delte as normal. If I am creating a code. I always duplicate it before removing stuff just in case and you can go backwards.

@PMUK I may have found a bug!

For @dan

If the component section is attached and part of the main window, then I can right-click to delete, rename custom HTML blocks (and globals):slight_smile:

However, if I have it in a separate window (which is how I tend to have my setup as I use three screens) then right-clcik doesn’t work!

Hi @RichardPhoto,

Thanks. You’re right, right-click to delete or rename doesn’t work when Components is in its own window. It works when it’s docked. There’s a fix in next release.

Cheers