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 8169249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:47:14+00:00 2026-06-06T20:47:14+00:00

I have an instance of CKEditor on a content-editing page. I’m looking to re-use

  • 0

I have an instance of CKEditor on a content-editing page. I’m looking to re-use or reset a CKEditor instance.

Use case

I have a table of which each cell is editable. When the user clicks a cell, I present them the CKEditor which provides editing functionality.

I’m setting data using CKEDITOR.instances.cellContent.setData( cellContent );

I’m getting data with var cellContent = CKEDITOR.instances.cellContent.getData();

This works well, except the CKEditor still thinks it has the old content after I call a setData()

  1. user clicks cell #1
  2. user edits cell #1, uses the color ‘red’ on a word
  3. user saves cell #1
  4. user clicks cell #2
  5. now CKEditor shows the color ‘red’ as being active/used. But in fact it isn’t because since that color has been used, other content has been loaded in the editor.

Does anyone know how to reset, reuse or (efficiently) re-instantiating a CKEditor instance?

(Google did not help me on this one)

Thanks for thinking along!

UPDATE 1

I’m using a single editor instance, which will be reused for editing of each table cell. (hidden when inactive, by setting display:none on containing element)

UPDATE 2

I’m using firefox 13.0.1 for Mac. Allthough this color problem does not occur on Chrome, the same issue does happen with the bold/italic buttons.

  • 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-06-06T20:47:15+00:00Added an answer on June 6, 2026 at 8:47 pm

    It’s not possible to re-instantiate editor on new element. One instance is bound to one editable for its entire life.

    You haven’t mentioned how do you initialize editor. For each table cell, because you want to have editors in cells? Or you have one editor, outside the table and you just want to load content of clicked cell there and update it on blur/change/etc.

    If you chose the first option, then you have to create editor instance for each table cell. You don’t have to do this on page load – it’d be better to do this on cell click. When user leaves the cell you don’t have to destroy (editor#destroy) editor – it’s better to hide it and reuse for the same cell later.

    If you chose the second option, then setData/getData should be enough to refresh editor’s UI (buttons states). I checked now and this looks like a bug. Luckily it can be easily fixed by calling editor#focus after setting data – then UI is updated (at least in my quick test). If it won’t work, delay focusing, because I was testing this manually from the console, so it was delayed by default.

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

Sidebar

Related Questions

I have a requirement where a user (while editing the content in a CKeditor
I have an instance of CKEditor on a page. I am trying to give
I have my CKEDITOR form prepopulated with hidden table which is being submitted together
I have - for instance - an asp:FormView which supports Read, Insert, Update, Delete
I have a table, I have cellForRowAtIndexPath delegate for it and I have instance
I have a page where I have multiple editors with the class .ckeditor. I'm
On my website I have a CKEDITOR to publish content. I have build an
I have instance of the client which should be focused. I found only following
I have a form in which I have CKEditor replacing my <textarea> s (multiple).
I have a CKEditor in my page. Like this <h:head> <title>Facelet Title</title> <script type=text/javascript

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.