Hi
Is it possible to apply the same stylesheet to the FCKEditor (in the backend) as I use on the frontend so that the text in the editor looks exactly like it will in the frontend?
If so, is it only possible to apply one stylesheet for all sites in the Dynamicweb solution, or can I apply one for each site?
Thanks,
Marianne H. Bertelsen
Developer forum
E-mail notifications
Styling of the FCKEditor
Posted on 27/07/2010 13:15:01
Replies
Nicolai Høeg Pedersen
Posted on 27/07/2010 13:40:33
Hi Marianne
In management center, Editing, Editor configuration you can set a checkbox "Apply stylesheet in editor" which will do that:
http://manual.net.dynamicweb.dk/Dynamicweb-On-line-Manual/Management-Center/Editor-configuration.aspx
It works contextual, meaning it will take the stylesheet that a particular page is using and use that for paragraphs on that page. If editing i.e. news and products that can be published on several pages/websites, the default stylesheet will be used.
BR Nicolai
In management center, Editing, Editor configuration you can set a checkbox "Apply stylesheet in editor" which will do that:
http://manual.net.dynamicweb.dk/Dynamicweb-On-line-Manual/Management-Center/Editor-configuration.aspx
It works contextual, meaning it will take the stylesheet that a particular page is using and use that for paragraphs on that page. If editing i.e. news and products that can be published on several pages/websites, the default stylesheet will be used.
BR Nicolai
Posted on 27/07/2010 15:59:57
Thank you for your answer. I'm not sure that I apply the stylesheet to the page correctly because I'm not getting the result I want. Here's what I do:
1. Click the page which contains a paragraph in the Navigation pane.
2. Click button Egenskaber (Properties)
3. Click tab Indstillinger (Don't know what it's called in English)
4. Click layout.
5. Select stylesheet that I want to use in "Stylesheet" dropdown.
6. Click ok in popup and save on page.
When I edit the paragraph in the page, the FCKEditor still is not using the stylesheet that i specify in step 5.
Did I misunderstand something? Do I need to specify the stylesheet for the page somewhere else?
1. Click the page which contains a paragraph in the Navigation pane.
2. Click button Egenskaber (Properties)
3. Click tab Indstillinger (Don't know what it's called in English)
4. Click layout.
5. Select stylesheet that I want to use in "Stylesheet" dropdown.
6. Click ok in popup and save on page.
When I edit the paragraph in the page, the FCKEditor still is not using the stylesheet that i specify in step 5.
Did I misunderstand something? Do I need to specify the stylesheet for the page somewhere else?
Nicolai Høeg Pedersen
Posted on 27/07/2010 16:03:07
You are doing it right.
BUT - you still have to make sure that the checkbox I mention in my previous post is checked in management center... Otherwise you would not be able to see your styles in the editor.
BUT - you still have to make sure that the checkbox I mention in my previous post is checked in management center... Otherwise you would not be able to see your styles in the editor.
Posted on 27/07/2010 16:08:07
Yes, you're right. I forgot to write that the "Apply stylesheet in editor" is checked.
It looks as though some other stylesheet is applied to the FCKEditor, but it isn't the "Default" one (headers are a different color in that one). Can I check that somewhere?
It looks as though some other stylesheet is applied to the FCKEditor, but it isn't the "Default" one (headers are a different color in that one). Can I check that somewhere?
Nicolai Høeg Pedersen
Posted on 27/07/2010 16:13:30
When viewing the frontend, you can view the source and in the last line you will get an ID of the stylesheet currently used on that page.
Otherwise send me a link on mail and I'll have a look.
Otherwise send me a link on mail and I'll have a look.
Posted on 28/07/2010 09:12:28
This is really strange. I checked the last line of the source code for my page (thank you for that tip, by the way :-) ) and confirmed that the id of the stylesheet is the same as the id of the stylesheet I have applied to that page -- and the styles of e.g. the heading are correct.
But the FCKEditor still uses another, unknown, stylesheet.
I've attached two screenshots so that you can see what I mean.
The "frontend.png" image show the page in the frontend. As you can see, the "pretty" colours that I put in my stylesheet are applied to the headings.
In the "fckeditor.png" image you can see that the same styles are not applied to the text in the FCKEditor.
What am I missing?
But the FCKEditor still uses another, unknown, stylesheet.
I've attached two screenshots so that you can see what I mean.
The "frontend.png" image show the page in the frontend. As you can see, the "pretty" colours that I put in my stylesheet are applied to the headings.
In the "fckeditor.png" image you can see that the same styles are not applied to the text in the FCKEditor.
What am I missing?
Nicolai Høeg Pedersen
Posted on 28/07/2010 09:31:08
Could be something as simple as browser cache...
Just checked the feature on my local solutions - it works like it should. Try resetting your browsers cache and see if that helps. Otherwise I'll need backend access to the solution so I can have a look.
Just checked the feature on my local solutions - it works like it should. Try resetting your browsers cache and see if that helps. Otherwise I'll need backend access to the solution so I can have a look.
Posted on 28/07/2010 10:40:15
I've tried clearing the cache in my browser - no change.
I guess there's something fishy about the way our Dynamicweb solution is set up. Unfortunately I cannot give you access to the solution as I am working on a local development version. Our live solution is managed primarily by another web development company, so I will contact them to see if they can shed some light on the situation. I just wanted to make sure that I hadn't misunderstood anything about how stylesheets are applied to pages first.
Something else I've noticed about the configuration of FCKEditor: When I change the settings in Management center > Editing > Editor configuration, they are changed in the iis\Files\Globalsettings.aspx file (in the <NewEditor> section), but no change happens to the FCKEditor when I edit a paragraph. I've tried logging out and then in again in Dynamicweb, but no change happens.
Does this give you any clue to what could be wrong? If not, I will try contacting the primary administrators of the solution with my problem.
I guess there's something fishy about the way our Dynamicweb solution is set up. Unfortunately I cannot give you access to the solution as I am working on a local development version. Our live solution is managed primarily by another web development company, so I will contact them to see if they can shed some light on the situation. I just wanted to make sure that I hadn't misunderstood anything about how stylesheets are applied to pages first.
Something else I've noticed about the configuration of FCKEditor: When I change the settings in Management center > Editing > Editor configuration, they are changed in the iis\Files\Globalsettings.aspx file (in the <NewEditor> section), but no change happens to the FCKEditor when I edit a paragraph. I've tried logging out and then in again in Dynamicweb, but no change happens.
Does this give you any clue to what could be wrong? If not, I will try contacting the primary administrators of the solution with my problem.
Nicolai Høeg Pedersen
Posted on 28/07/2010 10:50:14
Sounds like something is setup wrong... Try having a look in the installation guide found in documentation section.
Posted on 28/07/2010 13:02:09
Ok. I'm going to see if I can figure something out from the manual -- and otherwise I'm going to pass the buck on someone else :-)
Thank you for all you help and the quick responses!
Thank you for all you help and the quick responses!
Posted on 10/08/2010 13:39:14
Today I looked at this problem again, and I think I've discovered something about the way the FCKEditor is styled.
1. On the page itself a stylesheet created in Dynamicweb is applied, e.g. "stylesheet2255.css".
2. "stylesheet2255.css" references an external stylesheet, e.g. "MyStylesheet".
The css from "MyStylesheet.css" is applied to the page when viewing the page in the front-end.
The css from "MyStylesheet.css" is *not*, however, applied to the FCKeditor on the same page. Only the css from "stylesheet2255.css" is applied to the FCKEditor.
Is this a correct assumption? And if so, why is this the case?
--Marianne
1. On the page itself a stylesheet created in Dynamicweb is applied, e.g. "stylesheet2255.css".
2. "stylesheet2255.css" references an external stylesheet, e.g. "MyStylesheet".
The css from "MyStylesheet.css" is applied to the page when viewing the page in the front-end.
The css from "MyStylesheet.css" is *not*, however, applied to the FCKeditor on the same page. Only the css from "stylesheet2255.css" is applied to the FCKEditor.
Is this a correct assumption? And if so, why is this the case?
--Marianne
Nicolai Høeg Pedersen
Posted on 10/08/2010 13:43:11
That is a correct assumption. And that is because it was made before it was possible to add your own custom css file to the stylesheet.
For the next minor releas of DW the editor is updated to a newer version. This update will also include a change to the CSS you can use when editing paragraph so they can be controlled by the css used by layouts/designs (the new design implementation feature in DW).
I've also added a note about this problem on that work item, so if possible we will fix it.
For the next minor releas of DW the editor is updated to a newer version. This update will also include a change to the CSS you can use when editing paragraph so they can be controlled by the css used by layouts/designs (the new design implementation feature in DW).
I've also added a note about this problem on that work item, so if possible we will fix it.
Posted on 10/08/2010 13:46:58
Ok. That's why I see the behavior I do.
It's always nice to find the explanation for strange behavior rather than having a mystery floating around in one's application.
Thanks for the explanation. I look forward to the new features then.
It's always nice to find the explanation for strange behavior rather than having a mystery floating around in one's application.
Thanks for the explanation. I look forward to the new features then.
Posted on 16/02/2011 11:51:57
Hi,
I'm following up on this issue, and it seems as if it hasn't been fixed in the version of DynamicWeb that we are currently using (19.1.2.1).
Do you know it now possible to reference external stylesheets in order to make the editor have the same appearance as the frontend?
I'm following up on this issue, and it seems as if it hasn't been fixed in the version of DynamicWeb that we are currently using (19.1.2.1).
Do you know it now possible to reference external stylesheets in order to make the editor have the same appearance as the frontend?
You must be logged in to post in the forum