Code Monkey home page Code Monkey logo

Comments (20)

Bryan-Turek avatar Bryan-Turek commented on July 16, 2024 1

adding in the following code to tinymce.js fixes this issue. No other issues arise.

scope.$on('$destroy', function() {
          if (!tinyInstance) { tinyInstance = tinymce.get(attrs.id); }
          if (tinyInstance) {
            tinyInstance.remove();
            tinyInstance = null;
          }
        });

I would like to see this added to the main branch, as of right now I'll have to provide a modified tinymce.js to my project

from ui-tinymce.

mattcasey avatar mattcasey commented on July 16, 2024

+1 works for me, I am using ui-router views in case that makes any difference. (I've noticed the same error in other Angular plug-ins like Angularstrap tooltip, so maybe ui-router is mis-handling scope?).

from ui-tinymce.

zxbodya avatar zxbodya commented on July 16, 2024

As I have found - it is because tinymce is not properly removed after directive scope is destroyed - so script is trying to do something on destroyed scope(and because of that - there was no $root property in scope).

This was fixed in commit 96d9275

I also had this bug, because of #84. And probably you are also using outdated version because of that.

from ui-tinymce.

w3bappd3v avatar w3bappd3v commented on July 16, 2024

Any reason jojobyte's change hasn't been added?

from ui-tinymce.

LeleDev avatar LeleDev commented on July 16, 2024

It would be good to have this fixed soon...

from ui-tinymce.

ozee avatar ozee commented on July 16, 2024

@Bryan-Turek your solution worked for me, thanks.

from ui-tinymce.

chrisvans avatar chrisvans commented on July 16, 2024

I have the same issue, and @jojobyte's fix works for me.

from ui-tinymce.

emasch avatar emasch commented on July 16, 2024

@Bryan-Turek fix worked fine for me, but I have the same problem updateing to the next verision with bower as @zxbodya. A new version number would be nice ;-)

from ui-tinymce.

Bryan-Turek avatar Bryan-Turek commented on July 16, 2024

In the meantime I would just modify your tinymce.js, delete the line in bower.json for ui-tinymce (after you bower install it). and modify your .gitignore to keep that path to ui-tinymce. This way it won't be overwritten and you'll always have that modified version. Only downside is, you can't grab the new version, unless you modify that one as well.

from ui-tinymce.

shangxiao avatar shangxiao commented on July 16, 2024

@jojobyte's fix worked for me as well, perhaps this patch should be incorporated?

from ui-tinymce.

tezaurus avatar tezaurus commented on July 16, 2024

Working! Thank you!

from ui-tinymce.

AndreyKornyenko avatar AndreyKornyenko commented on July 16, 2024

Bug is reproducing for me

from ui-tinymce.

Uznick avatar Uznick commented on July 16, 2024

Still reproduces in 0.0.5

from ui-tinymce.

mudassir0909 avatar mudassir0909 commented on July 16, 2024

@Uznick did you find a workaround ?

from ui-tinymce.

Uznick avatar Uznick commented on July 16, 2024

@mudassir0909 nope, still living with it.

from ui-tinymce.

mudassir0909 avatar mudassir0909 commented on July 16, 2024

😢 guess I'll use a forked repo until then

from ui-tinymce.

wesleycho avatar wesleycho commented on July 16, 2024

I switched this to $rootScope, which is what the code should have referenced - this should now be fixed.

from ui-tinymce.

krunalsha avatar krunalsha commented on July 16, 2024

I have the same issue, and @jojobyte's fix works for me.

from ui-tinymce.

ervinkleitz avatar ervinkleitz commented on July 16, 2024

@jojobyte fix worked for me. Thanks!

from ui-tinymce.

webrider avatar webrider commented on July 16, 2024

Manually Triggering the Digest Cycle. Please use like this:
$scope.$apply(() => {
your code here that changes ng-model
});

from ui-tinymce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.