Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
3.98k stars 609 forks source link

How to count chars number of HTML in designer mode? #1323

Closed JTorresConsulta closed 1 year ago

JTorresConsulta commented 1 year ago

Hi, i need to count the HTML chars.

I am counting correctly in HTML mode with a simple:

$(document).on('keyup', '#MyTextField', function() {   
//Counting
});

It function is not triggered if editor is in editing mode.

How could i trigger the count of hidden HTML in edition or disigner mode?

PD: I kown this plugin to count chars of edition mode. https://github.com/paweljanicki/trumbowyg-counter

I want to count the hidden HTML chars in edition mode.

Thanks

JTorresConsulta commented 1 year ago

Ok, I assign the events to the class .trumbowyg-editor and works. Close