data attribute in JS

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
grimmus
Forum Members
Forum Members
Posts: 28
Joined: Sun Jan 11, 2009 7:17 am

data attribute in JS

Post by grimmus »

Hi,

I am trying to include some JavaScript in a global content block. It's all working fine except for a data-attribute that i have on an element. As soon as i save the code the data attr is removed.

Everything is wrapped in a literal tag.

Any tips on how to get this working is appreciated.
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm
Location: Marlow, UK

Re: data attribute in JS

Post by scooper »

If you're using the TinyMCE wysiwyg editor then that will strip out any tags it doesn't know about.

Probably your best bet is to disable the wysiwyg editor on that global content block. If you're adding javascript to it then it's probably not something that users who don't know what they're doing should have access to anyway.
Post Reply

Return to “The Lounge”