GithubHelp home page GithubHelp logo

Comments (7)

w8tcha avatar w8tcha commented on June 26, 2024

Yes you need to set the the same timeout 100 as the plugin does.

CKEDITOR.instances.editor1.on('afterPaste', function (event) { console.log(event.editor.wordCount.charCount) }, null,null,100);

this should work

from ckeditor-wordcount-plugin.

iliasmertzanos avatar iliasmertzanos commented on June 26, 2024

If I am getting this right there should be en event that we can bind without using timeouts. Timeouts can bring all lot of problems.
So the question is whats the problem ? Is this a bug in CKEditor or in Wordcount?

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on June 26, 2024

I thinks this is a misunderstand. The Value 100 is not a timeout event. its the execution priority...

The listener priority. Lower priority listeners are called first. Listeners with the same priority value are called in registration order.

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on June 26, 2024

If the value 100 is a problem for you i could remove it.

from ckeditor-wordcount-plugin.

iliasmertzanos avatar iliasmertzanos commented on June 26, 2024

Oh ok now I get it. But still I would expect that afterPaste should catch the right result from wordcount.
So I would say somehow there is a bug in CKEditor. Why would you need the priority if it would function correctly?

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on June 26, 2024

Why is this a bug i dont unterstand. The default value is 10. i set it to 100 to make sure that the events of the editor are executed before the content is filtered. Otherwise its possible that the counting is wrong

from ckeditor-wordcount-plugin.

stale avatar stale commented on June 26, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from ckeditor-wordcount-plugin.

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.