Created
November 29, 2011 19:32
-
-
Save cjolly/1406092 to your computer and use it in GitHub Desktop.
TinyMCE Config: Allow Facebook and Google Plus Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="social_widgets"> <!-- Keep this nbsp; so TinyMCE doesn't consider this div empty --> | |
<g:plusone size="medium"></g:plusone> | |
<fb:like layout="button_count"></fb:like> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('textarea.tinymce').tinymce({ | |
valid_child : "+div[fb:like|g:plusone]", | |
extended_valid_elements : "fb:like[*],g:plusone[*]", | |
custom_elements: "fb:like,g:plusone" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apparently you can style the resulting divs created in the WYSIWYG editor with the custom elements, too:
http://topsecretproject.finitestatemachine.com/2010/02/how-to-custom-tags-with-tinymce/