Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7191241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:41:12+00:00 2026-05-28T19:41:12+00:00

When CKEditor is loaded and I’m editing the stuff, I want the background to

  • 0

When CKEditor is loaded and I’m editing the stuff, I want the background to be yellow as I edit.

How do I “set” that stylesheet inside the editor.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:41:13+00:00Added an answer on May 28, 2026 at 7:41 pm

    There is an option contentsCss which lets you to load an external CSS stylesheet containing your custom style definitions. Using that you can make your content look exactly as it would look on your website. So in order to use it you need to instantiate CKEditor in the following way:

    CKEDITOR.replace('mytextarea', {
        // Custom stylesheet for the contents
        contentsCss : 'assets/custom.css'
    });
    

    And you would also define you custom.css for example as follows:

    body {
        font-family: Arial, Verdana, sans-serif;
        font-size: 12px;
        color: #444;
        background-color: yellow;
    }
    
    h1, h2 {
        color: #555;
        background-color: #EFEFEF;
    }
    
    /* etc some custom styles */
    

    EDIT. Using config.js

    There are couple of ways to achive what you need using config.js file. Example:

    CKEDITOR.editorConfig = function( config )
    {
        // ... some other configuration options
    
        // Define some custom class to be assigned to body element ogf the editor area
        config.bodyClass = 'body-yellow';
    };
    

    Create contents.css file in the same folder as config.js. Inside define your styles:

    .body-yellow {
        background-color: yellow;
    }
    

    That’s it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Ckeditor for Entering text and I want to save that
I want to manipulate a CKEDITOR instance once it is well and truly loaded,
I am using CKEditor/CKFinder as wysiwyg editor on my MVC.NET site. I have set
Is it possible to dynamically change the loaded stylesheet for a ckeditor instance? i.e.
I've got a CKEditor WYSIWYG text and HTML editor control on an HTTPS/SSL web
I like CKEditor and my server uses PHP. I want to use CKEditor to
With CKEDITOR, when I use JS to get the contents of the Text Editor,
Reading through the CKEditor documentation , I see that they have an option to
I am usuing CKEditor (version 3.0.2) in a site that I built. I have
CKEditor is a word like html editor. There is a option like saving file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.