Could someone give me a simple explanation how to add my site CSS to FCKeditor's style dropdown plse? I've read a couple of posts but I'm still unclear as to what I should put in the 'Body tag CSS' field in admin. With nothing or 'default' I get a couple of styles that seem to be from my site's CSS but with odd 'squashed' entries in bewteen.
?
Thanks in advance and a happy new year to all readers!
John
FCKeditorX & styles
-
westis
Re: FCKeditorX & styles
Hi John,
It's actually not quite working for me yet either. But I think you're supposed to put the styles like you would in a stylesheet, like this:
This is presuming that this class also exists in one of the stylesheets attached to your template, otherwise it will not display the expected way on the frontend.
My problem is that nothing shows in the dropdown when I'm trying it out myself, it's just empty. It's ok on MegaBob's test site though, don't know what it may be....
It's actually not quite working for me yet either. But I think you're supposed to put the styles like you would in a stylesheet, like this:
Code: Select all
.classone {
font-size: 1.2em;
color: #cccccc;
}My problem is that nothing shows in the dropdown when I'm trying it out myself, it's just empty. It's ok on MegaBob's test site though, don't know what it may be....
-
pinthenet
Re: FCKeditorX & styles
Thanks westis - that's a relief.
Seems a bit involved if you have a more complex style sheet or if you make changes. On the other hand I suppose I can then control which styles a user can use - many are not really necessary (or safe) for editors.
For megabob - it would be (or would it be?) good if the field in admin would expect the path/name of a css file with the styles needed?
John
Seems a bit involved if you have a more complex style sheet or if you make changes. On the other hand I suppose I can then control which styles a user can use - many are not really necessary (or safe) for editors.
For megabob - it would be (or would it be?) good if the field in admin would expect the path/name of a css file with the styles needed?
John
-
Caspar
Re: FCKeditorX & styles
that's my problem now, too...westis wrote: My problem is that nothing shows in the dropdown when I'm trying it out myself, it's just empty. It's ok on MegaBob's test site though, don't know what it may be....
does anyone have a clue why it worked in 0.11 and now doesn't? how about updating single files?
thanks, cas
-
kiwikeith
Re: FCKeditorX & styles
Am having exactly the same problem with my drop down styles not appearing. Can anyone help please?
-
kiwikeith
Re: FCKeditorX & styles
Managed to get it to work. It seems if you just use simple CSS classes - e.g. .style { font-size: 1.1em; } and put them both in your CSS file and the FCKEditor Styles tab, PLUS don't give a media type for the stylesheet.
I previously had a media type of screen. I had no styles in the drop down. Take out the media type. A style appeared.
)
I previously had a media type of screen. I had no styles in the drop down. Take out the media type. A style appeared.
-
Caspar
Re: FCKeditorX & styles
In fact, it works. It's defintely the media type. I left it empty for only one of my attached stylesheet - and only the css classes of that particular one are displayed in the drop-down field of FCK. It's a little weird, isn't it?kiwikeith wrote: PLUS don't give a media type for the stylesheet.
I previously had a media type of screen. I had no styles in the drop down. Take out the media type. A style appeared.)
Anyway, thanks a bunch, Keith!
-
Nanochild
Re: FCKeditorX & styles
Hi!
I got it to work with styles but not 100%
I inserted these style sheets into the FCKeditorX:
.h1 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:18px;
color:rgb(0,0,0);
}
.h2 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:16px;
color:rgb(0,0,0);
}
.h3 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:15px;
color:rgb(0,0,0);
}
.h4 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:14px;
color:rgb(0,0,0);
}
.h5 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:13px;
color:rgb(0,0,0);
}
.h6 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:12px;
color:rgb(0,0,0);
}
.p {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:normal;
font-size:12px;
color:rgb(0,0,0);
}
.pre {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:normal;
font-size:12px;
color:rgb(0,0,0);
}
.address {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:normal;
font-size:12px;
color:rgb(0,0,0);
}
This works fine when you just insert the text as ASCII on the pages in the FCKeditorX, but when i change the first line to a "h1" from the style dropdown, it write out a totally wrong no-standard code:
Header
Some text here
Where is the -end tag..?
This is illegal code and where did these -things comming from - i want totally clean code and i dont want to learn my customers how to program in HTML, but it seems that it´s not possible..?
Remember W3C (World Wide Web Consortium)..!
Just clean code please, it must be possible for GOD sake...
And yes, i am a little bit annoyed...
But no matter what, thanks..!
I got it to work with styles but not 100%
I inserted these style sheets into the FCKeditorX:
.h1 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:18px;
color:rgb(0,0,0);
}
.h2 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:16px;
color:rgb(0,0,0);
}
.h3 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:15px;
color:rgb(0,0,0);
}
.h4 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:14px;
color:rgb(0,0,0);
}
.h5 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:13px;
color:rgb(0,0,0);
}
.h6 {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:bold;
font-size:12px;
color:rgb(0,0,0);
}
.p {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:normal;
font-size:12px;
color:rgb(0,0,0);
}
.pre {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:normal;
font-size:12px;
color:rgb(0,0,0);
}
.address {
font-family:arial, serif, helvetica;
font-style:normal;
font-weight:normal;
font-size:12px;
color:rgb(0,0,0);
}
This works fine when you just insert the text as ASCII on the pages in the FCKeditorX, but when i change the first line to a "h1" from the style dropdown, it write out a totally wrong no-standard code:
Header
Some text here
Where is the -end tag..?
This is illegal code and where did these -things comming from - i want totally clean code and i dont want to learn my customers how to program in HTML, but it seems that it´s not possible..?
Remember W3C (World Wide Web Consortium)..!
Just clean code please, it must be possible for GOD sake...
And yes, i am a little bit annoyed...
But no matter what, thanks..!
Re: FCKeditorX & styles
Hi- it's OK- relax, chill...And yes, i am a little bit annoyed...
FCK is doing exactly what you're asking, but your asking it for the wrong thing. When you're referencing a standard HTML element, you don't put a "." in front of the element name. What you've done is create a load of new classes (.h1, .h2 etc...), and it's applying them for you in spans.
i.e.
you have:
.h1 {...
you should have
h1 {...
(that applies to your whole list there- delete all the "."s from before the element name)
Look again, there's no start tag either.Where is the -end tag..?
..actually, it's not- the code that FCK generated for you is 100% standards compliant.This is illegal code
HTH
C*
-
Nanochild
Re: FCKeditorX & styles
Thx for your reply and sry for my overwhelming bad move (i so bad)..!


