TinyMCE issues, again! "_mce_href="linkURL" WHY?

So was TinyMCE developed by SATAN himself? Herself? I have an issue thats driving me batty. I have a link page that has a textarea with some code so those interested in linking back to my site can simply copy the code & paste it into their site. Well sure enough once I drop the code into TinyMCE ( yes using the HTML feature and not using clean up) it ads its own dopey code as follows: _mce_href="linkURL" Normal code in, garbage out. Typical TinyMCE - To be exact the code that I paste in, or write in by hand is as follows.

<a href="http://www.285social.com/" target="_blank"><img src="http://rt285.com/social/linkback/285longlg.png" width="576" height="48" alt="285 Link Back Logo" /></a>

And the following is what TinyMCE spits out and does to the code. 

<a href="http://www.285social.com/" _mce_href="http://www.285social.com/" target="_blank"><br /> <img src="http://rt285.com/social/linkback/285longlg.png" _mce_src="/social/linkback/285longlg.png" width="576" height="48" alt="285 Link Back Logo" /></a>

 

I've gone in and stripped it out only to have it reappear when I save. Obviously. Would <code></code> work? I'd assume not since I had to tweak it to get <iframes> to work. So, is TinyMCE adding this because its inside of a textarea? And by "textarea" I mean it is:

 

<textarea name="Link Back to 285Social.com" cols="80" rows="5" disabled="disabled" readonly="readonly" title="285Social.com Link-back" dir="ltr" lang="en" label="285Social.com Link-back Large">

 

The actual page on my site with all this crap going on is: HERE if you want to see what I am seeing in the textarea boxes.

 

So I would assume if anyone uses this code with the mce href it isn't going to work. I haven't tested it but regardless I don't want it in my code. It shortens the one link making it local & breaks it and generally makes it a mess IMO. Anyone have any ideas on a work around? I've been thinking of using CKEditor. AND I mean, I've thought of just popping up the link images as I would assume most people know how to link back, but just on aesthetics I like the way it looks now, minus the TinyMCE crap. 

Sorry, I am just looking for fresh eyes and brains and suggestions, I'm fried atm and really just don't want the TinyMCE garbage in there. Once its out its fine as far as I'm concerned. Any ideas, suggestions, options are greatly appreciated. Hell, I'm so whooped at the moment, even snide remarks - if any - are welcome.

 

Thanks in advance. Cheers!

 

-maxi

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

insert it via DB

Quote · 5 Aug 2012

Thanks for the quick reply my friend.

 

I got to say tho, I haven't messed around with the DB. I was kind of thinking after I posted this that that would be a solution. I guess it's time to figure out how to do it that way tho, huh? 

Any other ideas? I know when it comes to fudgin' around the database a lot of people like myself are a little gun shy. Ok, I'll say it....Lazy Too! Tongue Out 

I need to learn at some point so I'll start pokin' around and see what I can do but if others have this problem and read this and are reluctant to get into db editing I'd like to see if there are indeed any other solutions.

 

Thanks again

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

Before I do something terrible, where in my database would I do this?

DB-virgin here, please be gentle.

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

I tested it and it doesn't appear that the crap TinyMCe adds effects the link, but like I said - I'd like it not to be there as part of the code so I still want to remove it. Maybe I have OCD? 

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

Replace your /administration/js/page_builder_tiny.js file with the one I've attached.

page_builder_tiny.js · 1.5K · 228 downloads
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 5 Aug 2012

Sweet.

 

Thanks!

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

Suggest you also upload this attached file to the same directory as a backup, in case the file ever gets overwritten by a Dolphin version upgrade.

Make sure to clear your caches after this change.

page_builder_tiny.Backup.js · 1.5K · 232 downloads
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 5 Aug 2012

I don't know if this will fix your particular issue, but it will fix a lot of others.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 5 Aug 2012

Have you ever done the fix mentioned by Prolaznik?

Just curious where I'd need to do the edit. Figured while I have this topic out there I'd try to cover all the basis for others that run across this.

Don't get me wrong I appreciate your fix, the js file - it appeals greatly to my laziness but since I don't/haven't gone in and done much of anything via the DB I'd just like to know. I'd like to see where I'd need to edit, still learning the ins & outs of Dolphin. 

If not, no biggie. If the js works - and appears it does - it works and thats all Im after.

 

Thanks again, Much appreciated.

 

-maxi 

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

I may need info on the DB edit fix after all.

 

Uploaded the js, then cleared cache from both admin & by hand via FTP before cleared browser cache, tried two other browsers after clearing their cache and then again after I made the HTML changes and the _mce_href TinyMCE stuff still appears. I've been able to find a few topics related to Joomla which I am more familiar with than Dolphin. They recommend re-enabling Clean up but from what Ive seen so far it sounds like doing that also causes other issues. If its doing that with Joomla I'm reluctant to try that with Dolphin. 


I'm going to give it some time. I've noticed that even when clearing the cache it takes a while for my server to catch up. No idea what thats all about but regardless, the js might start working correctly in a few mins. Yeah I know, its kooky but whatever - as long as it works at some point.

-maxi

 

Altho some are a bit dated, these are the links on this subject I've read so far:
http://www.tinymce.com/forum/viewtopic.php?id=9468
http://forums.modx.com/index.php/topic,32659.msg289933.html
http://www.tinymce.com/wiki.php/API3:class.tinymce.Editor 

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 5 Aug 2012

I  can't seem to reproduce this problem

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 5 Aug 2012

I just read you original post better.  Why you are using textarea tags?  Is there some reason you don't want to just post the code in the regular 'ole editor window (not html mode)??

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 5 Aug 2012

Well yeah, you are right, I could just do that but....

Maybe its the old school web nerd coming out, but I liked the aesthetics of having the code in the textarea, and lets face it not everyone ( I get a lot of novice users ) knows they can just highlight any inline code/text, having it in a box kind of makes it stand out, as if thats what they are supposed to highlight & copy, ya know? I know a lot of people grabbing the code off my site aren't very savvy, my thoughts where having the code in the textarea box would make it easier for them, as it were. Thought about adding a highlight/copy script to the textarea too but got derailed by the TinyMCE code.

And then when I realized what TinyMCE was doing, I wanted to know why - still do. Seemed like a good enough "teachable moment" Foot in Mouth especially on the database side of things, as I have little to no experience when it comes to editing my DB & would like to understand it. 

Guess when it comes down to it, sure I can just add the code to the block and call it done, I'd rather have it be clean & correct linking code than have the TinyMCE garbage in a textarea. The main gist is to make linking back to my site easier for those doing so. If making the TinyMCE crap go away requires jumping thru all kinds of hoops & hours of DB editing then its not worth it. It didn't appear to mess up the code when I tested it but who knows, whatever it is - I don't like what TinyMCE is doing for the most part. But yeah, using the textarea is purely an 
aesthetic thing, at least for this site. Followed by my own curiosity on a work around/fix for some of the stuff TinyMCE does. Like iframes and such. At least I got that working! I think I used your fix for that? Maybe. If so - Thanks for that too.

-maxi


285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 6 Aug 2012

You could wrap the code in a div, then style they div to make it stand out a little.... but really, if they can't figure out how to copy the code, they probably wouldn't know what to do with it anyway.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Aug 2012

Try This in the html editor:

<p>
    <textarea title="285Social.com Link-back" dir="ltr" lang="en" cols="80" rows="5" disabled="disabled" name="Link Back to 285Social.com"  readonly="readonly">
        &lt;a href="http://www.285social.com/" target="_blank"&gt;&lt;img src="http://rt285.com/social/linkback/285longlg.png" width="576" height="48" alt="285 Link Back Logo" /&gt;&lt;/a&gt;
    </textarea>
</p>

 

 You might want to get rid of that disabled attribute though.

 

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 6 Aug 2012

Whoa! Thanks! 
So it looks like its working now. I'm guessing using the special chars in the code break the TinyMCE garbage? Wouldn't of thought of that, good call. Of course that JS you sent could of kicked in too huh? Either way, I really appreciate you going out of your way to whip up that bit of code. Seriously. Thanks! I did nix the disable att. too.

Get to Colorado ever? I owe you a large and frosty adult beverage.

 

Thank you again

-maxi

285 Social of Colorado - www.285social.com - Connecting the Corridor
Quote · 6 Aug 2012

This is all reasons why, two years ago,  I lobbied against TinyMCE as an editor for html blocks.  It didn'tmake any sense then, and it still doesn't.  But Boonex, in their infinite wisdom, decided that TinyMCE was a better choice in the event that the dumbest person on earth needed to edit html blocks.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 7 Aug 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.