Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Wednesday, May 22 2013 @ 06:07 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 TinyMCE & GL
   
Arcanum
 04/06/05 02:25AM (Read 2462 times)  
++---
Junior

Status: offline


Registered: 11/05/04
Posts: 26
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.


 
Profile Email Website
 Quote
Robin
 04/06/05 02:53AM  
+++++
Full Member

Status: offline


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
PHP 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
PHP Formatted Code
    'font'    => array('size' => 1 , 'color' => 1),
 

And so on.
HTH

Geeklog Polish Support Team
 
Profile Email Website
 Quote
Arcanum
 04/06/05 03:02AM  
++---
Junior

Status: offline


Registered: 11/05/04
Posts: 26
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!


 
Profile Email Website
 Quote
Robin
 04/06/05 03:40AM  
+++++
Full Member

Status: offline


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

Geeklog Polish Support Team
 
Profile Email Website
 Quote
Anonymous: Turner
 04/08/05 02:45AM  



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
ldfoo
 04/08/05 12:01PM  
++---
Junior

Status: offline


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

 
Profile Email
 Quote
Anonymous: Turner
 04/08/05 01:40PM  



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
Anonymous: Turner
 04/08/05 01:43PM  



Lets try that again. Here is the real link here

 
 Quote
Turner
 05/02/05 10:55PM  
+++--
Chatty

Status: offline


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

 
Profile Email
 Quote
Anonymous: ldfoo
 05/03/05 03:11AM  



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

PHP 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
Content generated in: 1.19 seconds
New Topic Post Reply

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