Assistant functions are intended for small basic operations and are divided into subgroups.
For example, the [[helpers/string]] subgroup is designed to work with strings:
Jodit.modules.Helpers.ucfirst('hello'); // HelloJodit.modules.Helpers.camelCase('hello-world'); // helloWorldJodit.modules.Helpers.trim(' hello-world '); // hello-worldJodit.modules.Helpers.kebabCase('helloWorld'); // hello-world Copy
Jodit.modules.Helpers.ucfirst('hello'); // HelloJodit.modules.Helpers.camelCase('hello-world'); // helloWorldJodit.modules.Helpers.trim(' hello-world '); // hello-worldJodit.modules.Helpers.kebabCase('helloWorld'); // hello-world
And the [[helpers/html]] subgroup is designed to work with strings containing HTML:
Jodit.modules.Helpers.nl2br('hello\nworld'); // hello<br>world Copy
Jodit.modules.Helpers.nl2br('hello\nworld'); // hello<br>world
All helpers, regardless of the group, are in the namespace Jodit.modules.Helpers
Jodit.modules.Helpers
The most commonly used helpers are checkers [[helpers/checker]]:
Jodit.modules.Helpers.isBoolean('hello'); // falseJodit.modules.Helpers.isHtml('hello-world'); // falseJodit.modules.Helpers.isHtml('<p>hello world</p>'); // trueJodit.modules.Helpers.isInt('100'); // trueJodit.modules.Helpers.isInt('100.1'); // falseJodit.modules.Helpers.isInt('test'); // falseJodit.modules.Helpers.isFunction(() => {}); // trueJodit.modules.Helpers.isString(123); // false Copy
Jodit.modules.Helpers.isBoolean('hello'); // falseJodit.modules.Helpers.isHtml('hello-world'); // falseJodit.modules.Helpers.isHtml('<p>hello world</p>'); // trueJodit.modules.Helpers.isInt('100'); // trueJodit.modules.Helpers.isInt('100.1'); // falseJodit.modules.Helpers.isInt('test'); // falseJodit.modules.Helpers.isFunction(() => {}); // trueJodit.modules.Helpers.isString(123); // false
If you like Jodit - try Jodit PRO
Jodit helpers functions
Assistant functions are intended for small basic operations and are divided into subgroups.
For example, the [[helpers/string]] subgroup is designed to work with strings:
And the [[helpers/html]] subgroup is designed to work with strings containing HTML:
The most commonly used helpers are checkers [[helpers/checker]]: