Blocs 3, HTML Widget

I’m using the HTML Widget to point to a 3rd party php calendar script on my server. I’ve pasted the code into the code editor and checked it’s identical to that provided by the 3rd party. I believe the code pasted is a mix of HTML and JS.

I’ve had it working perfectly for a couple of years in previous versions of Blocs, but then I manually added it with BBEdit after exporting from Blocs but before uploading.

I, maybe wrongly, assumed that in Blocs 3 we would be able to use the widget with JS. To the point, the problem I’m having now is Blocs is inserting a little bit of code in the middle of the script that throws an error and doesn’t display the calendar. It is added during exporting as it can be seen in the developer tools option in Blocs preview mode.

The code I’m pasting is

<link href="" type="text/css" rel="stylesheet">
<script type="text/javascript" src=""></script>

What’s being exported is

<link href="" type="text/css" rel="stylesheet">
<script type="text/javascript" src="img/lazyload-ph.png" data-src=""></script>

The section
is being added on export.

The error throw up is
SyntaxError: Invalid character ‘\u65533’ lazyload-ph.png:1

Not too serious a problem as I can still revert to correcting it in BBEdit and then uploading.

I do have the live Preview unchecked in the HTML widget and have turned off ‘Use a preloader’ in the Project Settings, not sure if it’s related though

Any ideas?

@Norm A huge pat on the back for a wonderful upgrade!

Thanks, David

Looks like lazy load is messing with it. You can turn that off on export or add your code to the top of your page using page settings code options.

Or alternatively, switch off in app previewing on the code widget, You may need to re-add your snippet.

Thanks Norm,

I’ll try each of the above and report back this weekend.

All the best,


1 Like

Disabling the LazyLoad on Export did the trick.

Other than creating a separate project for the page concerned, would there be anyway to apply that to just one page? Some of the other pages on the site will be image heavy.

Thanks once again,

Im afraid not, its currently site wide.