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
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1242

PostPosted: Mon May 12, 2008 9:13 am Reply with quote

Edit "Messages" with CSS and it's lost when saviing. Load Message format in the editor, click on "Source" and nothing is shown in the <head> tag. So, how do you retain CSS style formatting? I MUST be missing SOMEthing (as usual). Smile

Cheers, Jay
 
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Mon May 12, 2008 9:30 am Reply with quote

Confused...messages can't affect what's displayed in the <head> tag. If the css class is lost from the message, that's a different issue.

_________________
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
dad7732
PostPosted: Mon May 12, 2008 9:32 am Reply with quote

Confusion override .. Smile

My "Messages" has a <head> tag with style. Everything in the <head> tag is lost when viewing the source and/or saving after editing the body of the message.

Cheers
 
kguske
PostPosted: Mon May 12, 2008 10:08 am Reply with quote

That's because head isn't defined in the allowableHTML array in config.php. You don't want this because it's defined (overridden) in the header.php file (i.e. even if the editor didn't remove it, it wouldn't work). You can do inline CSS or add the CSS (inline or linked) in the header.php, custom_header.php or javascript.php files.
 
dad7732
PostPosted: Mon May 12, 2008 10:26 am Reply with quote

Actually my "Messages" format on this particular site is a holdover from Nuke 6.5 in this example. What I can do is to edit the messages locally and then paste it as "source" and save. That works.

So, the only way to create style is inline in each tag in FCK without having to modify any other configuration file(s) which is fine by me. The least amount of fingers in the pie the better. Smile

Cheers
 
kguske
PostPosted: Mon May 12, 2008 8:56 pm Reply with quote

You could also have CSS defined externally, loaded in a link rel tag, and specify the class in the editor.
 
dad7732
PostPosted: Mon May 12, 2008 9:19 pm Reply with quote

Yep, can do that as well. Also found out something else interesting. I can enter:
Code:
<style type="text/css">

.hot3 {
    font-family: verdana,arial;
    color: black;
    font-weight: bold;
    background-color: ivory;
    font-size: 14px;
    width : 600px;
    margin-left : auto;
    margin-right : auto;
    border : thin solid red;
    padding : 15px;
    text-align: justify;
   }


body {
background-color:black;
}
</style>

at the top of the regular html, just do NOT add a <head> or anything else including a <body> tag or else the CSS will be stripped upon a re-edit.

Also interesting is that FCK will add a <p> before the <style> tag and a </p> after the </style> tag. All CSS will be intact from edit to edit and that way I don't have to do inline style, etc. However, I do like the use of the link rel tag as that's a bit easier depending on the complexity of the CSS.

Cheers
 
montego
Site Admin


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

PostPosted: Mon May 12, 2008 9:26 pm Reply with quote

Yeah, because embedding CSS in-line the way you are doing here will break compliance (XHTML).

_________________
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
dad7732
PostPosted: Mon May 12, 2008 10:14 pm Reply with quote

Dunno what it's breaking, works in FF, Seamonkey, Nav 9, Flock, etc.
 
montego
PostPosted: Tue May 13, 2008 5:33 am Reply with quote

dad7732, if being XHTML compliant is of no value to you and it renders fine for you in all the browsers that you wish to support, then forget what I said.
 
dad7732
PostPosted: Tue May 13, 2008 6:03 am Reply with quote

No no ... let me restate, sorry!! What I meant was, "what does it break?". If there is a critical issue then I need to fix it, thanks.
 
Gremmie
Former Moderator in Good Standing


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

PostPosted: Tue May 13, 2008 7:01 am Reply with quote

Doing it that way is non-compliant, i.e. it is against the rules of XHTML.

_________________
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: Tue May 13, 2008 11:57 am Reply with quote

dad7732 wrote:
However, I do like the use of the link rel tag as that's a bit easier depending on the complexity of the CSS.

And, it's XHTML compliant, so you get the Good Housekeeping Seal of Approval (just kidding).

Seriously, you might as well just put the CSS inline (instead of insert the style outside the <head> tag). That will work and keep the compliance police happy, too.
 
dad7732
PostPosted: Tue May 13, 2008 5:47 pm Reply with quote

Thanks guys!! It's only the one site brought up from Nuke 6.5 where there was only the basic editor AND my most important support site to boot. So .. keeping the fingers out of the pie will suffice for the moment but I will reformat the messages on THAT site on my local system making sure it works and is compliant and THEN upload it. All the rest based on RN will of course will be formatted correctly from the beginning.

Good Housekeeping Seal accepted .. Very Happy

Cheers
 
montego
PostPosted: Wed May 14, 2008 5:55 am Reply with quote

Quote:
and keep the compliance police happy, too


ROTFL

I figured someone has to pick up the charge for 64bitguy.
 
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 ©