Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> FCKeditor/WYSIWYG Issues
Author Message
ohiodarter
Hangin' Around


Joined: Nov 06, 2002
Posts: 32

PostPosted: Fri Mar 30, 2007 10:50 pm Reply with quote

Quick question regarding WYSIWYG. When I edit a block, say a center block - in the editor, I can clearly see that the font size is X-Large and it is Comic Sans. Yet when I save it and go back to the Home page, it is tiny again. What am I missing as far as making What I See What I REALLY get. Thanks in advance for any help on this.
Mike
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 6:49 am Reply with quote

This is strange, but I can confirm what you are saying. I just went in and edited the first article on my test site for RN2.10, fkelly.org. I selected the text (I was testing the ampersand issue with that article) and changed it to extra large, comic sans. Saved it. Went to the home page and it was still "normal" sized. Went back into the editor and looked at source. It does have the font size and type tags around the text but for some reason it's not appearing on the home page. I'll keep looking but we may need Kguske to help with this ... though actually the editor seems to be doing what it's supposed to, it's the presentation that's not working properly.
 
View user's profile Send private message Visit poster's website
fkelly
PostPosted: Sat Mar 31, 2007 7:08 am Reply with quote

Wow. I looked further, looked at view source and in the source the text is wrapped inside the appropriate font code. That font code is in turn wrapped inside a couple of divs one of which has the class=content. I was thinking maybe the class was overriding the font so I saved the source html file and went in and edited it and took the divs out of that area. Still no joy, the comic sans isn't showing. I even edited the text a bit to be sure I wasn't seeing a cache artifact and the new text is there. Humm ... I wonder if that font might be missing from our systems. I'll be back.
 
fkelly
PostPosted: Sat Mar 31, 2007 7:19 am Reply with quote

No, missing font doesn't have anything to do with it. I can change the font color and it works fine. I even tried wrapping the text in a h1 tag and, though the tag is there it doesn't affect the size of the font. Very odd. I even tried out IE to see if it was a browser specific issue and the same problem occurs. I also edited the opening message on my test site and the same problem occurs there as in news.

It's hard to understand how this could have slipped thru all the testing we did so I'm still looking for a different explanation.
 
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Sat Mar 31, 2007 8:17 am Reply with quote

Without looking at it, I'd say fkelly was on the right track regarding CSS overriding the font.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
fkelly
PostPosted: Sat Mar 31, 2007 12:37 pm Reply with quote

I'm not sure Kguske. Cause when I saved my page as html and went in an manually edited the styles out the font size still didn't work. And, looking up font size thru Google shows that there are a fair number of experts saying we shouldn't be using that anyway.

Manually I can get most of the font attributes to work, like color, but when I put size in it has no effect. Very strange. Maybe I will try a "pure" html document because even taking the "immediately adjacent" styles out might leave some others still in effect.
 
ohiodarter
PostPosted: Sat Mar 31, 2007 1:03 pm Reply with quote

I am starting to lean towards the CSS override as well. I have two new sites that have different themes. One of them works for font sizing and one doesn't. I'm going to compare the CSS files of each and report back here on any differences.
 
fkelly
PostPosted: Sat Mar 31, 2007 1:10 pm Reply with quote

I think the problem is that we put font sizes in style.css, so for instance we have:

font {font-family: Verdana,Helvetica,sans-serif; font-size: 10px}

in the style.css for fisubice. I suspect this is overriding any explicitly coded size.

In fact, I just edited style.css for fisubice to eliminate the size from the font class in the style file and uploaded it to fkelly.org and the size attributes in the font tag now work.

I don't know what the other implications of removing this from the style.css would be, but it does seem to fix this one problem.
 
ohiodarter
PostPosted: Sat Mar 31, 2007 2:52 pm Reply with quote

I copied over the css file from a theme that allowed me to use the different font sizes and it worked flawlessly. Didn't have the time to compare the code, but I can guarantee that it is indeed the css file overriding nuke...
 
fkelly
PostPosted: Sat Mar 31, 2007 3:31 pm Reply with quote

I have made just the one change I mentioned, removing the font-size from the style.css in fisubice and tested on fkelly.org. It seems to solve the problem. Whether the font-size should be in some other styles there is an open question to me.

Before:

Code:
font {font-family: Verdana,Helvetica,sans-serif; font-size: 10px}


after:

Code:
font {font-family: Verdana,Helvetica,sans-serif}


I looked at the Nukenews theme too and tried the same fix out. The font size was not showing up (in other words being overridden by the style) before I made the change and it is showing up after.

We probably need to make the same change to other themes but I'd want Raven and/or Montego and others to look at this first and see if they see any problems and/or if we should remove the font-size from td body p etc.
 
kguske
PostPosted: Sun Apr 01, 2007 6:20 am Reply with quote

I was going to suggest removing references to the css file, or temporarily making it empty. But it seems you've confirmed that's where the issue is.

As for removing the font size from the CSS, another option is to create additional classes with the appropriate font size and specify those in the content, rather than overriding the font size.
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Sun Apr 01, 2007 6:57 am Reply with quote

The only thing that concerns me is if font requires the use of an explicit size in CSS to validate - I'll have to check on that.

Creating a new font class would seem to be the best option as you said Smile
 
View user's profile Send private message Send e-mail
fkelly
PostPosted: Sun Apr 01, 2007 7:09 am Reply with quote

Let us know Guardian. Kguske, yes, that would work but I was trying to keep the "size" of the fix down. If we can fix this problem by just removing one attribute from one class in each style.css where it occurs that would seem to me to be desirable short term. Users would need very little PHP expertise to make those changes themselves and the probability of fouling up "other things" would be minimized.

Many references on the web state that we shouldn't be sticking in font-size="whatever" tags outside of classes in our documents anyway. But straightening that out is probably something we should build into the next release. I think that right now the wysiwyg editor puts such codes in when a user choses a font size but I'd need to double check to be sure.
 
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Apr 01, 2007 10:13 am Reply with quote

Maybe the WYSIWYG editor should be configured to wrap text in its own classes for size and colors (e.g. span tags). Font tags are evil, according to the latest dogma. Wink

Then we could add a wysiwyg.css link to header.php.

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
kguske
PostPosted: Mon Apr 02, 2007 2:41 pm Reply with quote

Danger, Will Robinson!

That would be a good deal of work and it would likely cause conflicts with most themes...
 
Gremmie
PostPosted: Mon Apr 02, 2007 5:29 pm Reply with quote

And removing font sizes from all themes isn't a lot of work? Wink

I don't know how hard it is to make the editor spit out span tags with classes instead of font tags...but is it that bad?

And then the classes in wysiwyg.css would be suitably named so as to not conflict with existing themes.

E.g.

span.wysiwyg-large { font-size: large; }
span.wysiwyg-xlarge {font-size: x-large; }

I'm just rambling but that is my idea. It's using CSS they way it was supposed to be IMHO.
 
fkelly
PostPosted: Mon Apr 02, 2007 5:38 pm Reply with quote

I could remove font sizes from all themes style.css files in ... oh ... probably a half hour and have them back to the svn in that time too. We would want to run thru and test them all that way but I don't think there would be complications. Famous last words (:

However, users who have the problem bothering them probably have enough information at this point to make their own adjustments (a.k.a. hacks). There are really two issues in my mind at this point:

1. Why did we stick font-size into those classes in the css in the first place? And is that a good idea? They go beyond just the "font" class to a bunch of others. I'm not a css expert by any means but that just doesn't look like a good idea to me and it permeates the themes.

2. How difficult is it to adjust the editor as Gremmie suggested and is that the best approach.

We are relatively early in a new release cycle and coming up with the "best" solution at this point takes priority. I think.
 
Gremmie
PostPosted: Mon Apr 02, 2007 5:42 pm Reply with quote

If the wysiwyg editor continues to spit out font tags, then folks with custom themes are likely going to run into the same problem. If the wysiwyg editor emits span tags with classes, and the classes have unique enough names, I can't imagine their theme being able to override the editor, and it will work for everyone.
 
kguske
PostPosted: Mon Apr 02, 2007 6:11 pm Reply with quote

If you use FireFox, you can trying this setting in includes/FCKeditor/fckconfig.js:
Code:
FCKConfig.GeckoUseSPAN   = true ;
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Mon Apr 02, 2007 6:39 pm Reply with quote

Hopefully the editor is smart enough to not try and SPAN across a block tag... can you spell compliance issue? Sad

(My God, I sound more and more like Steph with each passing day... )

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
kguske
PostPosted: Mon Apr 02, 2007 7:07 pm Reply with quote

The problem with that setting is that it gives different results for IE and FF.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> FCKeditor/WYSIWYG Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©