Tagged: advanced editor, event tracking, external URL, GA
Hi,
I’ve tried to add an onclick HTML attribute to a a tag (link) in a text block (in the advanced editor) and it’s always deleted when I save the page.
How can I keep it ?
thanks.
Hi Oli!
Try using the codeblock element instead.
Regards,
Elliott
Hi Elliott,
I’ve tried and it works in a code block element but I told editors to add HTML code ( onclick=”_gaq.push([‘_trackEvent’, ‘Downloads’, ‘PDF’, ‘201411_PortraitIngenieur2030VF.pdf’]);”) in a link tag but I’m not sure we have skills to create a entire HTML code block.
Is there a way to authorize onclick attribute in text block ?
Thanks
Oli
Hey!
I’m sorry but I’m not sure I understand. It would be easiest to use the codeblock element if you need to use HTML along with your other text. Send us a link so we can get a better idea of what your trying to do.
Regards,
Elliott
Hi,
yes : http://www.mines-telecom.fr/formation/debouches-et-metiers/observatoire-des-metiers/ on the link [Télécharger le document “Portrait de l’ingénieur 2030”]
But it’s not a good example. If I have a big text block with several links, it will be hard to manage it only with HTML code. It’s easier to use the wysiwyg editor and, if needed adding the onclick attribute.
Oli
Hey!
Unfortunately it would be kind of difficult to change that. What I would do is if you need to use the WYSIWYG then drag a text block over and add all of your content and then copy it and paste it into a codeblock element.
Best regards,
Elliott