Constants

You can use Jodit constants in your code

import { Jodit } from 'jodit';
console.log(Jodit.constants.IS_IE);
console.log(Jodit.constants.APP_VERSION);

APP_VERSION

Const APP_VERSION: string

Defined in

src/core/constants.ts#20


ES

Const ES: "es5" | "es2015" | "es2018" | "es2021"

Defined in

src/core/constants.ts#22


IS_ES_MODERN

Const IS_ES_MODERN: boolean

Defined in

src/core/constants.ts#23


IS_ES_NEXT

Const IS_ES_NEXT: boolean

Defined in

src/core/constants.ts#24


IS_PROD

Const IS_PROD: boolean

Defined in

src/core/constants.ts#25


IS_TEST

IS_TEST: boolean

Defined in

src/core/constants.ts#26


FAT_MODE

Const FAT_MODE: boolean

Defined in

src/core/constants.ts#27


HOMEPAGE

Const HOMEPAGE: string

Defined in

src/core/constants.ts#28


TOKENS

Const TOKENS: Record<string, string>

Defined in

src/core/constants.ts#30


INVISIBLE_SPACE

Const INVISIBLE_SPACE: ""

Defined in

src/core/constants.ts#32


NBSP_SPACE

Const NBSP_SPACE: " "

Defined in

src/core/constants.ts#33


IS_BLOCK

Const IS_BLOCK: RegExp

Defined in

src/core/constants.ts#42


IS_INLINE

Const IS_INLINE: RegExp

Defined in

src/core/constants.ts#45


LIST_TAGS

Const LIST_TAGS: Set<"ul" | "ol">

Defined in

src/core/constants.ts#47


INSEPARABLE_TAGS

Const INSEPARABLE_TAGS: Set<HTMLTagNames>

Defined in

src/core/constants.ts#61


NO_EMPTY_TAGS

Const NO_EMPTY_TAGS: Set<HTMLTagNames>

Defined in

src/core/constants.ts#67


KEY_META

Const KEY_META: "Meta"

Defined in

src/core/constants.ts#69


KEY_BACKSPACE

Const KEY_BACKSPACE: "Backspace"

Defined in

src/core/constants.ts#70


KEY_TAB

Const KEY_TAB: "Tab"

Defined in

src/core/constants.ts#71


KEY_ENTER

Const KEY_ENTER: "Enter"

Defined in

src/core/constants.ts#72


KEY_ESC

Const KEY_ESC: "Escape"

Defined in

src/core/constants.ts#73


KEY_ALT

Const KEY_ALT: "Alt"

Defined in

src/core/constants.ts#74


KEY_LEFT

Const KEY_LEFT: "ArrowLeft"

Defined in

src/core/constants.ts#76


KEY_UP

Const KEY_UP: "ArrowUp"

Defined in

src/core/constants.ts#77


Const KEY_RIGHT: "ArrowRight"

Defined in

src/core/constants.ts#78


KEY_DOWN

Const KEY_DOWN: "ArrowDown"

Defined in

src/core/constants.ts#79


KEY_SPACE

Const KEY_SPACE: "Space"

Defined in

src/core/constants.ts#80


KEY_DELETE

Const KEY_DELETE: "Delete"

Defined in

src/core/constants.ts#82


KEY_F3

Const KEY_F3: "F3"

Defined in

src/core/constants.ts#84


NEARBY

Const NEARBY: 5

Defined in

src/core/constants.ts#86


ACCURACY

Const ACCURACY: 10

Defined in

src/core/constants.ts#87


COMMAND_KEYS

Const COMMAND_KEYS: string[]

Defined in

src/core/constants.ts#89


BR

Const BR: "br"

Defined in

src/core/constants.ts#103


PARAGRAPH

Const PARAGRAPH: "p"

Defined in

src/core/constants.ts#104


MODE_WYSIWYG

Const MODE_WYSIWYG: 1

WYSIWYG editor mode

Defined in

src/core/constants.ts#109


MODE_SOURCE

Const MODE_SOURCE: 2

html editor mode

Defined in

src/core/constants.ts#114


MODE_SPLIT

Const MODE_SPLIT: 3

Source code editor and HTML editor both like

See

http://getuikit.com/docs/htmleditor.html|this

Defined in

src/core/constants.ts#120


IS_IE

Const IS_IE: boolean

Is Internet Explorer

Defined in

src/core/constants.ts#125


TEXT_PLAIN

Const TEXT_PLAIN: "text" | "text/plain"

For IE11 it will be 'text'. Need for dataTransfer.setData

Defined in

src/core/constants.ts#133


TEXT_HTML

Const TEXT_HTML: "html" | "text/html"

Defined in

src/core/constants.ts#134


TEXT_RTF

Const TEXT_RTF: "rtf" | "text/rtf"

Defined in

src/core/constants.ts#135


MARKER_CLASS

Const MARKER_CLASS: "jodit-selection_marker"

Defined in

src/core/constants.ts#137


EMULATE_DBLCLICK_TIMEOUT

Const EMULATE_DBLCLICK_TIMEOUT: 300

Defined in

src/core/constants.ts#139


INSERT_AS_HTML

Const INSERT_AS_HTML: "insert_as_html"

Paste the copied text as HTML, all content will be pasted exactly as it was on the clipboard.
So how would you copy its code directly into the source document.

<h1 style="color:red">test</h1>

Will be inserted into the document as

<h1 style="color:red">test</h1>
Defined in

src/core/constants.ts#152


INSERT_CLEAR_HTML

Const INSERT_CLEAR_HTML: "insert_clear_html"

Same as [[INSERT_AS_HTML]], but content will be stripped of extra styles and empty tags

<h1 style="color:red">test</h1>

Will be inserted into the document as

<h1>test</h1>
Defined in

src/core/constants.ts#164


INSERT_AS_TEXT

Const INSERT_AS_TEXT: "insert_as_text"

The contents of the clipboard will be pasted into the document as plain text, i.e. all tags will be displayed as text.

<h1>test</h1>

Will be inserted into the document as

&gt;&lt;h1&gt;test&lt;/h1&gt;
Defined in

src/core/constants.ts#176


INSERT_ONLY_TEXT

Const INSERT_ONLY_TEXT: "insert_only_text"

All tags will be stripped:

<h1>test</h1>

Will be inserted into the document as

test
Defined in

src/core/constants.ts#188


SAFE_COUNT_CHANGE_CALL

Const SAFE_COUNT_CHANGE_CALL: 10

Defined in

src/core/constants.ts#190


IS_MAC

Const IS_MAC: boolean

Defined in

src/core/constants.ts#192


KEY_ALIASES

Const KEY_ALIASES: IDictionary<string>

Defined in

src/core/constants.ts#196


BASE_PATH

Const BASE_PATH: string

Defined in

src/core/constants.ts#220


TEMP_ATTR

Const TEMP_ATTR: "data-jodit-temp"

Defined in

src/core/constants.ts#249


lang

Const lang: IDictionary<IDictionary<string>> = {}

Defined in

src/core/constants.ts#251


CLIPBOARD_ID

Const CLIPBOARD_ID: "clipboard"

Defined in

src/core/constants.ts#253


SOURCE_CONSUMER

Const SOURCE_CONSUMER: "source-consumer"

Defined in

src/core/constants.ts#254


PASSIVE_EVENTS

Const PASSIVE_EVENTS: Set<string>

Defined in

src/core/constants.ts#256

SET_TEST

SET_TEST(): boolean

Returns

boolean

Defined in

src/core/constants.ts#29


INVISIBLE_SPACE_REG_EXP

INVISIBLE_SPACE_REG_EXP(): RegExp

Returns

RegExp

Defined in

src/core/constants.ts#34


INVISIBLE_SPACE_REG_EXP_END

INVISIBLE_SPACE_REG_EXP_END(): RegExp

Returns

RegExp

Defined in

src/core/constants.ts#35


INVISIBLE_SPACE_REG_EXP_START

INVISIBLE_SPACE_REG_EXP_START(): RegExp

Returns

RegExp

Defined in

src/core/constants.ts#36


SPACE_REG_EXP

SPACE_REG_EXP(): RegExp

Returns

RegExp

Defined in

src/core/constants.ts#38


SPACE_REG_EXP_START

SPACE_REG_EXP_START(): RegExp

Returns

RegExp

Defined in

src/core/constants.ts#39


SPACE_REG_EXP_END

SPACE_REG_EXP_END(): RegExp

Returns

RegExp

Defined in

jodit/src/core/constants.ts:40