Solved

Change the background colour of CKEditor from white to blue

Posted on 2011-09-10
5
581 Views
Last Modified: 2012-05-12
How do I change the background colour of CKEditor from white to blue.

If I change the background-color of the body tag in the contents.css located in the ckediter folder it changes the color as required, but I am trying to change the color of just one of instance of CKEditor not both, is this possible?

Thanks in advance for your feedback.


// The initial value to be displayed in the editor.
$CKEditor_initialValue = "$content";
$CKEditor = new CKEditor();
$CKEditor->basePath = "../webassist/ckeditor/";
$CKEditor_config = array();
$CKEditor_config["wa_preset_name"] = "Edit Web Page (custom)";
$CKEditor_config["wa_preset_file"] = "(custom)";
$CKEditor_config["width"] = "530px";
$CKEditor_config["height"] = "600px";
$CKEditor_config["skin"] = "office2003";
$CKEditor_config["docType"] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
$CKEditor_config["contentsLanguage"] = "";
$CKEditor_config["dialog_startupFocusTab"] = false;
$CKEditor_config["fullPage"] = false;
$CKEditor_config["tabSpaces"] = 4;
$CKEditor_config["filebrowserBrowseUrl"] = "../webassist/kfm/index.php?uicolor=".urlencode(isset($CKEditor_config["uiColor"])?str_replace("#","#",$CKEditor_config["uiColor"]):"#eee")."&theme=webassist_v2&startup_folder=web_pages";
$CKEditor_config["toolbar"] = array(
array( 'Cut','Copy','Paste','PasteText','PasteFromWord','Print','SpellChecker','Scayt'),
array( 'Undo','Redo','Find','Replace','SelectAll','RemoveFormat'),
array( 'BidiLtr','BidiRtl','NumberedList','BulletedList'),
('/'),
array( 'Outdent','Indent','Blockquote','CreateDiv'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'Smiley','SpecialChar','PageBreak','TextColor','BGColor','Maximize','ShowBlocks'),
array( 'Image','Flash','Table','HorizontalRule'),
('/'),
array( 'Styles','Format'),
array( 'Font','FontSize','Bold','Italic','Underline','Strike'),
array( 'Bold','Italic','Underline','Strike','Link','Unlink','Anchor','Source'));
$CKEditor_config["contentsLangDirection"] = "ltr";
$CKEditor_config["entities"] = false;
$CKEditor_config["pasteFromWordRemoveFontStyles"] = false;
$CKEditor_config["pasteFromWordRemoveStyles"] = false;
$CKEditor_config["stylesCombo_stylesSet"] = "my_styles:style_lists/stylelist5.js";
$CKEditor->editor("content", $CKEditor_initialValue, $CKEditor_config);

// The initial value to be displayed in the editor.
$CKEditor_initialValue = "$content2";
$CKEditor = new CKEditor();
$CKEditor->basePath = "../webassist/ckeditor/";
$CKEditor_config = array();
$CKEditor_config["wa_preset_name"] = "Edit Web Page (custom)";
$CKEditor_config["wa_preset_file"] = "(custom)";
$CKEditor_config["width"] = "320px";
$CKEditor_config["height"] = "600px";
$CKEditor_config["skin"] = "office2003";
$CKEditor_config["docType"] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
$CKEditor_config["contentsLanguage"] = "";
$CKEditor_config["dialog_startupFocusTab"] = false;
$CKEditor_config["fullPage"] = false;
$CKEditor_config["tabSpaces"] = 4;
$CKEditor_config["filebrowserBrowseUrl"] = "../webassist/kfm/index.php?uicolor=".urlencode(isset($CKEditor_config["uiColor"])?str_replace("#","#",$CKEditor_config["uiColor"]):"#eee")."&theme=webassist_v2&startup_folder=web_pages";
$CKEditor_config["toolbar"] = array(
array( 'Maximize','Cut','Copy','Paste','PasteText','PasteFromWord','SpellChecker'),
array( 'Undo','Redo','RemoveFormat','BidiLtr','BidiRtl','Source'),
('/'),
array( 'Outdent','Indent','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'Link','Unlink','Bold','Italic','Underline','TextColor','BGColor'),
array( 'Image','Flash','Table','NumberedList','BulletedList'),
('/'),
array( 'Styles','Format',),
array( 'Font','FontSize'));
$CKEditor_config["contentsLangDirection"] = "ltr";
$CKEditor_config["entities"] = false;
$CKEditor_config["pasteFromWordRemoveFontStyles"] = false;
$CKEditor_config["pasteFromWordRemoveStyles"] = false;
$CKEditor_config["stylesCombo_stylesSet"] = "my_styles:style_lists/stylelist5.js";
$CKEditor->editor("content2", $CKEditor_initialValue, $CKEditor_config);
0
Comment
Question by:sabecs
  • 3
5 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 36515844
0
 

Author Comment

by:sabecs
ID: 36516131
Thanks gurvinder372, I did try http://cksource.com/forums/viewtopic.php?f=11&t=15899 but no luck.

0
 
LVL 16

Expert Comment

by:HagayMandel
ID: 36516158
ckeditor takes its back color from the html tag!!
Change your html background-color, to desired one.
0
 

Author Comment

by:sabecs
ID: 36516198
Thanks HagayMandel for your help, I tried html {background-color: #444; } but the editor background was still while..
0
 

Author Closing Comment

by:sabecs
ID: 36517832
Thanks gurvinder372, I did find a solution on the forum.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now