Are inline script tags seen by BSS in Custom Code block?

Edit - sorry I was going to delete this because removing the script tags did work when I copied it into a js file, but I saw that Jo-r was replying :slight_smile:

I’m trying to re-use (pinch) some existing code that comprises HTML with inline script tags. I created a div and converted it to HTML and then just pasted the existing code into the custom code editor.

It seems to not see the javascript in the script tags? It doesn’t display the script tags in the document map, just the ‘construction’ tags for the code. Is that expected behaviour?

I’m not that au fait with JS to be able to pull out the script stuff, convert it and put it into a js file :frowning:

Custom Code blocks are not able to process file locations the same as if you dragged a component in that included one. You need to spell out the exact location of the files for it to know where they are. You can use relative links once you know everything works, but until then I would suggest creating a separate directory on your server for these files and then reference them with Absolute links.

If you choose change them to relative links later, just keep in mind that the items will not view correctly in preview window or browser, but will show correctly online as long as it was working before you changed the links to relative.

Also be sure that the files you have included are uploaded to the server in the correct location as well. These are usually the 2 culprits with getting things to work within Custom Code blocks.

1 Like