Code Monkey home page Code Monkey logo

Comments (7)

danoaky-tiny avatar danoaky-tiny commented on July 29, 2024 1

The problem is there's a required call to editor.getContent within onEditorChange, in order to supply the content for the callback. This is where the setup you provided will cause an image refetch.

If applicable, you could opt to use the editor as an uncontrolled component and call getContent when you need it.

Another solution that could work (depending on your use case) is to have something like a changeEvents prop added. This would be used to override the default list of events that onEditorChange fires on. So to fix this particular case, you'd want to not fire on the 'input' event.

Otherwise this would need to be addressed as a core TinyMCE issue. As it's replicable in a TinyMCE fiddle and in the Angular integration too, see: https://codesandbox.io/p/sandbox/int-3288-539h9p

from tinymce-react.

danoaky-tiny avatar danoaky-tiny commented on July 29, 2024

Could you please provide a code sandbox or a code snippet? I've tried replicating with the React integration, but I've only found this problem when deleting a selection of text, nothing with keyup events. And this can also be replicated in core TinyMCE, see this TinyMCE fiddle. In which case this would be an issue to do with core and not the React integration.

from tinymce-react.

enoh-barbu avatar enoh-barbu commented on July 29, 2024

@danoaky-tiny I have updated my description, and after some debugging I found out that the bug can be reproduced if:

  1. codesample plugin is used
  2. onEditorChange is used
  3. disable cache setting in dev tookls is checked

Just go ahead on that example, paste/insert an image, and start typing in the editor

from tinymce-react.

danoaky-tiny avatar danoaky-tiny commented on July 29, 2024

Internal ref: INT-3288

from tinymce-react.

enoh-barbu avatar enoh-barbu commented on July 29, 2024

For now I just removed codesample plugin, as I don't use it at all

from tinymce-react.

github-actions avatar github-actions commented on July 29, 2024

This issue is stale because it has been open for 30 days with no activity. Respond with a comment or this will be closed in 7 days.

from tinymce-react.

enoh-barbu avatar enoh-barbu commented on July 29, 2024

Not sure what prio has this one, but I think it's still an issue which might need some attention, if possible

from tinymce-react.

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.