jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Event 'limit.limit' not triggered when the number of limitChars is exceded

Open snjpost opened this issue 5 months ago • 1 comments

Jodit Version: 4.2.27

Browser: Chrome/FF OS: Linux Is React App: False Reproduced on xdsoft.net: False (not able to set limitChars)

Code

import { Jodit } from 'jodit';

const editor = Jodit.make('#editor', {
    limitChars: 10
});

editor.e.on('limit.limit', () => {
    console.error('Limit reached!');
    editor.message.error('Limit reached!');
    return false;
});

Expected behavior: A warning when more than 10 chars have been typed.

Actual behavior: No warning.

snjpost avatar Sep 19 '24 10:09 snjpost