Hi, I am going completely crazy.
I click on Edit HTML, add my custom tags, like for example add:
<a href="myimage.jpg" rel="lightbox[][my caption]">
and automatically my special tags get stripped:
<a href="myimage.jpg" >
and so the rel parameter is eliminated and I can't use Lightbox!
I am going completely nuts, I just can't edit the source code as it gets everything filtered by TinyMCE after clicking on Update on the Edit HTML code TinyMCE's window.
That is, this happens without me clicking on Submit or Preview Post (also FULL HTML input is enabled - this is about TinyMCE which 'tidy ups' my code on Edit HTML window) .
I went to TinyMCE configuration and disabled all HTML Clean up options, but still, TinyMCE does not permit me to add my custom HTML tags.
Please help me, I've been struggling with this for more than an hour and I am going completely crazy.
Thanks!
Rod
Comment | File | Size | Author |
---|---|---|---|
#5 | tinymce.module.patch | 775 bytes | TecHusky |
Comments
Comment #1
rodrix CreditAttribution: rodrix commentedThis is actually critical, TinyMCE makes useless all input format as it strips out all unknown tags.
It also strips out php tags, and any tags that are unknown.
Do anyone have a solution for this?
Comment #2
rodrix CreditAttribution: rodrix commentedI found the solution myself.
You need to edit the tinymce.module file.
You should add your wanted extra html tags under this function:
You should see the TWO steps that I marked.
Also there is a full XHTML tags defined on this patch that could come in very handy and could be considered an alternative solution: http://drupal.org/node/51097#comment-381617
This will help many. I read more than 15 support issues and TinyMCE FAQ's before getting to the solution.
In return, can someone tell me how to deactivate TinyMCE for modules that have Text Input = PHP, AND ONLY enable for blog posts, node, and comments .
I have found similar issues but only state the code for disabling PHP. Could anyone give me a hand and tell me the appropiate code to add?
Thanks!
Rod
Comment #3
spiffyd CreditAttribution: spiffyd commentedRod,
No, thank you! Interestingly, I guess everyone's too anxious to configure their Lightbox than to reply with a simple thank you :P
At least there's the light side - no one else will go nuts anymore.
D
Comment #4
spiffyd CreditAttribution: spiffyd commentedFixed. Fin.
Comment #5
TecHusky CreditAttribution: TecHusky commentedThank you SOO much! This did what the bottle of aspirin couldn't do for my headache after trying to figure this out for hours.
Edit: Here's a patch for this if anyone is interested... all it does is add "rel|" into the correct spot.
Comment #6
halley CreditAttribution: halley commentedVERY, very, very, very thanks man... u r my guru :)
Comment #7
loopduplicateDon't edit the module file directly, override it in your theme. Right? For reference, here's a page explaining how to use the theme layer in Drupal: http://drupal.org/node/165706
re: