We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Weirdness with LG TinyMCE 1.3.3, 2.0 and Fieldframe

Development and Programming

Ryan Blaind's avatar
Ryan Blaind
168 posts
16 years ago
Ryan Blaind's avatar Ryan Blaind

Ok, so I’ve got this bit of weirdness going on in my EE CP. I started off, using Brandon Kellys Fieldframe extension, and some of the standard fieldtypes that it comes with. For my WYSIWYG functionality I decided to give Leevi Grahams LG TinyMCE 2.0 a whirl, which is a fieldtype for fieldframe.

After a couple of days using it it was giving me random blank CP screens, which I assume were PHP errors. I didn’t have error reporting turned on, but did some testing around and came to the conclusion that it was that fieldtype that was giving me the blank CP screens. So, I removed the LG TinyMCE 2.0 fieldtype and decided to just go with the LG TinyMCE 1.3.3 extension.

Now however when I go to my field group, for some fields under field type, for some reason the extension is adding the word “WYSIWYG” to my other field types that aren’t WYSIWYG fields. I have attached a screenshot so you can see what I mean.

Everything seems to be working fine however with my EE install, everything is behaving as expected, however this is just one little thing that will drive me nuts until I figure out a way to fix it. Part of me wants to re-install EE and start from scratch, but I was hoping that someone here would have some insight into why this is being caused, and even better, how I can fix it without having to go back and re-do all the EE setup.

Any hints, suggestions, etc would be greatly appreciated, thanks 😊

       
Ryan Blaind's avatar
Ryan Blaind
168 posts
16 years ago
Ryan Blaind's avatar Ryan Blaind

I think I might just create a new field group with all of the same fields, and delete the old field group as it doesn’t seem to be happening on the new field group. Oh well, don’t have to start over at the beginning, but it will take a bit of time to copy/paste all of the current content into the new fields.

       
Ryan Blaind's avatar
Ryan Blaind
168 posts
16 years ago
Ryan Blaind's avatar Ryan Blaind

ok weirdness solved kinda, mods can go ahead and delete this thread. I just ended up deleting the field group and creating essentially a duplicate of the old field group, and now the random WYSIWYG tags are gone. cheers

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
about 16 years ago
Luke Hardiman's avatar Luke Hardiman

Took me a while to find the FieldFrame version of LG TinyMCE. Its over at github if anyone is looking for it. Not sure why Leevi doesn’t link to it anywhere.. are there bugs I should be looking out for?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
15 years ago
Leevi Graham's avatar Leevi Graham
Took me a while to find the FieldFrame version of LG TinyMCE. Its over at github if anyone is looking for it. Not sure why Leevi doesn’t link to it anywhere.. are there bugs I should be looking out for?

Hey Luke,

I didn’t make the custom field public because there were still a few bugs with fieldframe at the time. We resolved all of the bugs today and pushed a new version of the field type to GitHub.

Download it and let me know what you think!

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
15 years ago
Leevi Graham's avatar Leevi Graham

Probably should mention the new URL is https://github.com/newism/lg.tiny_mce.field_type.ee_addon.

       
helloitsbao's avatar
helloitsbao
4 posts
15 years ago
helloitsbao's avatar helloitsbao

Hi Leevi,

Nice work on the extension. I’ve been waiting to use multiple tinyMCE config files! I did find a bug.

When I used it inside of the FF Matrix, it did not render an editor when I added a row. It only added a textarea.

Bao

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
15 years ago
Luke Hardiman's avatar Luke Hardiman

Thanks for this Leevi. I use this extension (and now the fieldtype) a lot.

I have just squashed a bug / feature issue (depending on who you ask) relating to TinyMCE itself that has been harassing me on and off on a couple of EE installs for ages.

It seems some time in 2008 or 2009 TinyMCE stopped encoding single and double quotes by default. This is not a problem in EE when working with Textarea fields, but for some reason with LG TinyMCE fields, conditionals choke on unescaped strings. Stuff like this: {if lg_tinymce_field} or {if lg_tinymce_field != ''} leads to ‘unexpected string’ parse errors.

To try and fix this I added a callback to my LG TinyMCE config file like this:

save_callback : "fixQuotes",

Which calls this

// Tiny MCE fields do not contain escaped quotes any more. 
// This is causing conditional problems.
function fixQuotes(element_id, html, body) {
    html = html.replace(/(\>[^<]*?)'/g,'$1'');
    html = html.replace(/(\>[^<]*?)"/g,'$1"');
    html = html.replace(/"/g,'\"');
    html = html.replace(/'/g,"\'");    
    return html;
}
}

Edit:Unfortunately the above solution doesn’t work either for some unknown reason - quotes remain unencoded. Now I’m back to sheer ugliness in my templates:

{if '{exp:replace find="QUOTE|'" replace="|" multiple="yes"}{location_tours}{/exp:replace}' != ''}

Leevi, do you have any idea how I can go about sorting this out?

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
15 years ago
Luke Hardiman's avatar Luke Hardiman

Update again: I’ve reverted back to version 1.33 (the non-fieldframe extension) and I’m not having the conditional problem any more.

Wish I could isolate where the two extensions differ.

       
MarqueDigital's avatar
MarqueDigital
33 posts
15 years ago
MarqueDigital's avatar MarqueDigital
Hi Leevi, Nice work on the extension. I’ve been waiting to use multiple tinyMCE config files! I did find a bug. When I used it inside of the FF Matrix, it did not render an editor when I added a row. It only added a textarea. Bao

I too have noticed this.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.