Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 03:31 am EST

Geeklog Forums

TinyMCE & GL


Status: offline

Arcanum

Forum User
Junior
Registered: 11/05/04
Posts: 26
Location:Hokkaido, Japan
I'm trying to integrate a WYSIWYG into Geeklog. The purpose is so that average users without any knowledge of HTML can create basic static pages, stories and other content that look a little nicer than just text. I checked out HTMLArea, FCKeditor and TinyMCE and decided to go with TinyMCE because it loads the fastest and runs the options I want it to in both Firefox and IE.

My problem I have comes with the editing of text, specifically colors and font sizes. If TinyMCE is used to edit text in a story, any font size or color changes to that text aren't displayed. For example, if a block is set to be 20pt font and blue, it will look that way in the editor window but as soon as it is saved it will not save those changes. It will, however save other changes such as bold, underline and tables.

The weird thing is that it works perfectly fine with static pages. I can go in and use TinyMCE, change the font size and colors, save it and it works great. But for some reason in the stories no font or color changes are saved at all.

I have all of the html tags that are used by TinyMCE allowed in config.php in GL. I also have them correctly configured in the TinyMCE configuration. I at first thought that it was something with TinyMCE, so I went and installed FCKeditor but I had the exact same problem: I can save all editing just fine in static pages, but in stories it doesn't save color or font size changes. I tried deleting the font specifications in my CSS file but that didn't do anything. No matter what I seem to do, I can't get either TinyMCE or FCKeditor to save changes to text color and size in stories. It works great in static pages, but not in stories.

Does anyone have any idea why this is? Am I missing something somewhere in the config.php file that I need to change? I think it's really weird that it works in static pages and not in stories, plus since I get the same problem with both FCKeditor and TinyMCE I'm thinking it's something to do with my GL configuartion. Anybody have any thoughts?

Thanks.

 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
My wild guess would be that in addition to adding a specific tag to config.php you need to assign an array of this tag features. E.g. if you add this to your config.php
Text Formatted Code
    'font'    => array(),
 

it means that this tag won't be stripped during saving however any additional features like size, color etc. will be gone. I.e. you will need to add something like this to your config.php
Text Formatted Code
    'font'    => array('size' => 1 , 'color' => 1),
 

And so on.
HTH
Geeklog Polish Support Team
 Quote

Status: offline

Arcanum

Forum User
Junior
Registered: 11/05/04
Posts: 26
Location:Hokkaido, Japan
That did it, thanks! I didn't realize that the tag attributes also had to be put in there. It all works perfectly now. Though I still wonder why the attributes were stripped in the stories but not in static pages. Anyway, thanks again!

 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Quote by Arcanum:Though I still wonder why the attributes were stripped in the stories but not in static pages.

Go to Staticpages Editor and look for a message in red (hint: right below the biggest textarea). That's your answer Wink
Geeklog Polish Support Team
 Quote

Turner

Anonymous
Both Arcanum & Robin: Would you help me on this issue?

Arcanum - are you loading the TinyMCE stuff in the header.thtml?

Robin and/or Arcanum - I have this 'b' => array(), in the config.php file (in the $_CONF['user_html'] array). Yet when I save anything with TinyMCE it strips the tags out.

What gives?

-Jeff
 Quote

Status: offline

ldfoo

Forum User
Junior
Registered: 05/10/04
Posts: 34
One solution would be to include this tag in the config.php

'strong' => array(),

Tiny_mce seems to recognise 'strong' and not 'b' for bold face Smile
 Quote

Turner

Anonymous
Hey thanks. Lookin' good.

A few more questions about this pakage:

1. Are you putting the TinyMCE script stuff in header.thtml?
I do and it works; but when I save a story, GL doesn't return me to the story screen. It just hangs. here is what's happening Could you respond to it?

2. Any other configurations I need to make to get this working. I just used it right out of the box.
 Quote

Turner

Anonymous
Lets try that again. Here is the real link here
 Quote

Status: offline

Turner

Forum User
Chatty
Registered: 04/11/05
Posts: 42
I'll try to start over with this issue.

Is anyone using Tinymce and GL with Internet Explorer (IE)? For some reason, when I try to save an article or comment, TinyMCE blanks out the text field. It only happens in IE (version 6). Firefox is fine.

If you've solved this, please help. Ormaybe you could suggest a small speedy alternative.

-Jeff
 Quote

ldfoo

Anonymous
I have a site with tinyMCE and GL. Firstly, I have no problem with ie - does seem to have a problem with my preferred firefox. I don't understand the browser callback etc and whether that has any influence?

Here is one of the scripts I use at the top of submitstory_advanced.thml Just my two cents

Text Formatted Code
<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="../tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
        tinyMCE.init({
                mode : "specific_textareas",
        theme : "advanced",
                plugins : "table,advimage,emotions",
                theme_advanced_buttons1_add_before : "fontselect,fontsizeselect",
                theme_advanced_buttons1_add : "",
                theme_advanced_buttons2_add : "emotions,advimage",
                theme_advanced_buttons2_add_before: "",
                theme_advanced_buttons3_add_before : "tablecontrols,separator",
                theme_advanced_buttons3_add : "",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "center",
                theme_advanced_path_location : "bottom"

        });

</script>
<!-- /tinyMCE --
 


Generally, it is quite slow with all the plugins - I removed the TinyMCE code from the header.thml and put the code in the beginning of the relevant files - story_advanced etc - that way I hope it is only adding overhead when that file is used. This also allowed me to vary the number of TinyMCE plugins it uses on different pages. I am extending this and am providing a plain vanilla theme without editors as default and a user selectable theme which incorporates editors for those who want to use them.
 Quote

All times are EST. The time is now 03:31 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content