Posted: August 17, 2020 at 10:10 am
|
Hi there, We have just tried adding some embed code from a form creation tool called ClickDimensions (a Microsoft Dynamics plugin). Unfortunately we’re finding that this line of code <div pageID=”100000057″></div> is getting stripped down to just <div></div>, which stops the form embed working. Do you know why this code might be being stripped out, and what we can do to stop this happening? Thanks! Ruth |
Hi Ruth,
Currently, you would need to switch to ‘Text mode’ on the editor and then paste in that code but if you then switch back to visual mode at all, those values will be stripped out again. Where exactly are you adding that div? |
|
|
Hi Tony, The full code that we embed (in the main part of the page, where you put the event description, and in the Text tab rather than the Visual tab) is this: <script type=”text/javascript”>var loc = “https://analytics-eu.clickdimensions.com/jbscamacuk-a1tdd/pages/”;</script> But the last line gets changed to just <div></div> when I switch from the Text tab to the Visual tab then back again… |
That’s expected and happens because pageid isn’t a valid attribute on a div element. Without custom code you will need to add the above snippet into text mode but as mentioned if you switch back to visual it will strip them out once again. There are a couple of options to prevent that but both require custom code, you can either: Hook into TinyMCE and add your own valid attribute of pageid to the div element or Hook into the event output and add the embed code via code rather than in the editor, for example, you could add a custom field with the key of |
|
|
Thank you Tony, that’s really helpful, we’ll do that! |
Personally I’d likey use option 2 and if you are looking to do that there are various hooks you can use depending on the specific location you want to add the code. For example |
|
The support post ‘Some HTML code getting stripped out when event published’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.