JS breaks editing ability

JS breaks editing ability was created by trogladyte

Posted 6 years 5 hours ago #47996
FYI, I have JCE installed and set to the default editor. If I paste JS code into the PG editor it gets deleted, regardless of what editor (other than JCE) is selected in Joomla's global config.

Start an article and save. Change to PB. Add a text block and paste in a JS script. I used the one below. At this point the page breaks. Clicking the PB save (upper left button) does not close it, though clicking Style shows the main Joomla save buttons. Click Joomla save.

Now, when you mouse over any element, the editing icons have gone and nothing is editable. The only way to edit is to delete the article and rebuild. However, I pasted the code into a standard Joomla custom module then added that module to the PB article as a module element rather than pasting the code into a text element. Doing it this way did not break the page.
Code:
<script src="//js.hsforms.net/forms/v2.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> hbspt.forms.create({ portalId: "4430137", formId: "c107a864-dbb4-459d-a505-c4ce26439e1e" }); </script>

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic JS breaks editing ability

Posted 6 years 4 hours ago #47998
Hi
thank you for the info
in this case, like you said, you can use a module :)
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.641 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 936 guests and no members online