Solved

Change the background colour of CKEditor from white to blue

Posted on 2011-09-10
5
579 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to count occurrences of each item in an array.

746 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

13 Experts available now in Live!

Get 1:1 Help Now