2

I'm trying to use Addthis (http://www.addthis.com) script to place things like Facebook "Like" buttons on my pages. When I put the "Like" code in and save it TinyMCE strips part of the code out? For example. This is the Follow Us code.

<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
</div>

After I save and check again the fb:like:layout="button_count" section is removed by TinyMCE.

Note: I use TinyMCE within EpiServer CMS 6 R2

Is there a way to fix this?

Thanks.

Naveen Velaga
  • 648
  • 1
  • 11
  • 22

1 Answers1

1

You will need to configure tinymce not to stripout those attributes. Have a look at the tinymce configuration parameter valid_elements.

Thariama
  • 50,002
  • 13
  • 138
  • 166
  • Yes I have tried this [TinyMCEPluginNonVisual(AlwaysEnabled = true, EditorInitConfigurationOptions = "{valid_elements: 'a[fb:like:layout=]'}")] But it did not help – Naveen Velaga Dec 18 '12 at 15:05
  • hmm, i do not know if it is valid to put those ':' right there – Thariama Dec 18 '12 at 15:17
  • I have tried putting "*" , then it allowed "fb:like", but it trimmed ":layout". – Naveen Velaga Dec 19 '12 at 06:40
  • i do not know if the Serializer is able to understand complex expressions like this...but there should be asolution. I suggest you ask in the tinymce forum directly - with luck one of the developers will answer. – Thariama Dec 19 '12 at 08:59
  • did not find anything at TinyMCE forum either, had to go with a jquery fix, to add the attribute dynamically – Naveen Velaga Dec 19 '12 at 09:25