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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:42:36+00:00 2026-05-26T10:42:36+00:00

How should I go about this? I was able to get the data into

  • 0

How should I go about this?

I was able to get the data into CKEditor by using a textarea with the name attribute matching my model and a script tag with ng:bind-template to call CKEDITOR.replace.

I then made a CKEditor plugin that detects changes and writes them back to the textarea. The problem is that the textarea looses its event handlers when CKEditor initializes and CKEditor doesn’t pickup changes to the textarea. This makes me think that I am approaching this the wrong way.

Next I tried using ng:eval-order="LAST" ng:eval="setupCKEditor()" and setting up the editor from the setupCKEditor() function. This didn’t work because even with ng:eval-order="LAST" the function is still run before the nodes are created.

I have found that adding a setTimeout(function () {...},0) around the CKEDITOR.replace helps. Now the only problem is that when it changes the model it doesn’t repaint the screen until another field is edited.

scope.$root.$eval(); seems to fix that.

Update

We ended up abandoning this since we could never get it to reliably work. We switched to TinyMCE with Angular-UI for a while and then ended up building something custom.

  • 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-26T10:42:36+00:00Added an answer on May 26, 2026 at 10:42 am

    This sort of works with the onchange plugin from http://alfonsoml.blogspot.com/2011/03/onchange-event-for-ckeditor.html.

    angular.directive("my:ckeditor", function (expression, compiledElement) {
        return function fn(element) {
            var scope = this;
    
            setTimeout(function () {
                CKEDITOR.replace("editor-" + index, {extraPlugins: 'onchange'});
    
                scope.$watch("layers[" + index + "].src", function () {
                    if (!CKEDITOR.instances["editor-" + index]) return;
                    if (scope[expression] == CKEDITOR.instances["editor-" + index].getData()) return;
                    CKEDITOR.instances["editor-" + index].setData(scope[expression]);
                });
    
                CKEDITOR.instances["editor-" + index].on("change", function () {
                    scope[expression] = CKEDITOR.instances["editor-" + index].getData();
                    scope.$root.$eval();
                });
            }, 0);
        };
    });
    

    Update

    This has only been tested on v0.10.6

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

Sidebar

Related Questions

Two quick questions if I may, is this how I should go about taking
We had a meeting this morning about how would should store our ID for
I'm working on a project in C#, it's about E-learning.This project should use plug-ins
This should be easy, but I'm not sure how to best go about it.
I'm trying to learn this basic thing about processors that should be taught in
This question is NOT about race-conditions, atomicity, or why you should use locks in
Well, I'm making my foray into this fantastic site with a question about the
We should forget about small efficiencies, say about 97% of the time: premature optimization
Are there any VC++ settings I should know about to generate better PDB files
Are there any big differences a developer should care about?

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.