Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CKEDITOR Stylesheet
#1
I thought a while back their was a method created which would automatically find the stylesheet for the active theme and include it in ckeditor?

Am I mistaken, If not how do I get this to work?
Reply
#2
if theme\editor.css exists it is loaded into as the stylesheet for CKEditor
My Github Repos: Github
Website: DigiMute
Reply
#3
I see, could you think of any way to make it automatically know the default stylesheet for the active theme?
I am more then willing to do the work myself, but would appreciate some direction if you can think of any.

Thanks for your help so far! That will work if I cannot figure anything else out.
Reply
#4
mikeh Wrote:I see, could you think of any way to make it automatically know the default stylesheet for the active theme?

Mikeh,

your question is not explicite enough. What do you want exactly:
  • do you want that the text-area in the editor uses the same css-elements as the default stylesheet of the active theme
  • do you want to have all or some of your css-elements in the styles-dropdown-lists of the editor?

#1:

as long as every theme uses its own filename for the default stylesheet, this seems difficult to me.
I just checked some themes and found

- styles.css
- default.css
- ...

some locate the css in same folder as template.php, some othes use more complicated filestructures with subdirectories...

as there are no strict rules for themes (and that is ok) this seems difficult to do automatically

the only way would be to add a dialogue when activating a theme

#2:

maybe this can be done in in a custom-config-file or in the editor-options (which I did not test), see here:

http://docs.cksource.com/CKEditor_3.x/Ho...tomization

if you want to define it automatically so that it will follow all theme-switches, it will need a certain "styles.js" in every theme folder, see here: http://docs.cksource.com/CKEditor_3.x/De...ide/Styles

I do not see any way to have it automatically

the best would be some more knowledge about ckeditor and how it works, as these questions arise with every CMS or blog-system or whatever ... it is not "get-simple-specific'

I am thinking about collecting infos like that in the wiki, but as usually too many projects and not enough time
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#5
n00dles101 Wrote:if theme\editor.css exists it is loaded into as the stylesheet for CKEditor

Mike - are there any other steps for this in GS3.0? I've added applicable styles to a CSS sheet (in the "typical" css format and layout), named the file accordingly, and uploaded to the root "theme" folder (not my current theme folder). My styles are still showing as the CK default.

I've got a custom config setup for the editor in my gsconfig file, but I've tried it with the built-in "advanced" call and neither seem to be catching it.
Reply
#6
as described in another posting lately (yesterday), the editor.css must sit in the active theme's folder
I tested it and got the fonts, background-colors etc.

see here: http://get-simple.info/forum/post/19679/#p19679

if its done like that, you will have a flexible solution, if you place the file into the theme's root, you will always have to copy that file when switching themes (and then you will have no advantage over the inbuilt stylesheet)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply




Users browsing this thread: 1 Guest(s)