LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 03-30-2007, 05:31 AM   #1
elvijs
LQ Newbie
 
Registered: Nov 2006
Location: Latvia
Distribution: Slackware
Posts: 15

Rep: Reputation: 0
Exclamation TinyMCE deletes custom HTML


I'm using TinyMCE v2.1.0 as my CMS WYSIWYG editor. I needed an mp3 player for my site and I made my own plugin to make inserting music files more comfortable. My plugin inserts code like this:
Code:
<embed type="application/x-shockwave-flash" flashvars="file=mp3file.mp3" pluginspage="http://www.macromedia.com/go/getflashplayer" bgcolor="#FFFFFF" height="70" width="300" src="mp3player.swf"></embed>
But the problem is that the editor immediately deletes this code. I found that it "cleans up" HTML, but I don't want it to delete my own code, it's just not right! I tried to resolve the problem following this, but it didn't work for me. What do I have to do to make my plugin work correctly?
 
Old 03-31-2007, 03:21 PM   #2
MoonMind
Member
 
Registered: May 2005
Location: Switzerland
Distribution: Debris Linux, Ubuntu, Debian
Posts: 448

Rep: Reputation: 38
I'm no TinyMCE expert, and I generally try to avoid WYSIWYG for the exact reason of avoiding hassles like the ones you've run into, but I think manual browsing might help in this case (I don't know if you did any config hacking yet, though)

As far as I can see, it's a configuration problem; look throught the configuration options here:

http://wiki.moxiecode.com/index.php/...eanup.2FOutput

I guess <embed></embed> isn't among the "valid elements" (or even is an "invalid element"). You can also disable cleanup. Here's a link to a list you can find a collection to enable all(?) XHTML elements (or rather, declare them as valid):

http://wiki.moxiecode.com/index.php/...HTML_rule_set:

M.

Last edited by MoonMind; 03-31-2007 at 03:22 PM.
 
Old 04-02-2007, 11:37 AM   #3
elvijs
LQ Newbie
 
Registered: Nov 2006
Location: Latvia
Distribution: Slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Well, I worked around this issue, but couldn't get my plugin work. The strange thing is that it accepts code from Embedded Media plugin, but when I try to insert the same code through my own plugin, TinyMCE cuts it out. I really can't understand where's the problem. By the way, disabling html cleanup helped, but it had a bad affect on everything else, the editor created non xHTML compatible tags. Oh, and enabling all HTML tags didn't help.
 
  


Reply

Tags
wysiwyg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Txt Edr.- HTML- Custom Saved Code "Snippets" WhatsOnYourBrain Linux - Software 1 04-01-2007 04:36 PM
Changing text colors in OpenOffice.org to custom html (hex) aldimeneira Linux - Software 0 08-24-2006 01:40 AM
custom HTML background for KDE using Nvu digitalhead Linux - Software 1 03-07-2005 08:59 PM
help with a script that deletes files more than X days old BrianK Linux - General 5 06-14-2004 10:05 PM
Windows installation deletes Linux? SuSE_User Linux - Newbie 3 03-28-2004 05:26 AM


All times are GMT -5. The time now is 07:39 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration