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


globalWindow

Const globalWindow: typeof window

Defined in

src/core/constants.ts#42


globalDocument

Const globalDocument: Document

Defined in

src/core/constants.ts#45


IS_BLOCK

Const IS_BLOCK: RegExp

Defined in

src/core/constants.ts#50


IS_INLINE

Const IS_INLINE: RegExp

Defined in

src/core/constants.ts#53


LIST_TAGS

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

Defined in

src/core/constants.ts#55


INSEPARABLE_TAGS

Const INSEPARABLE_TAGS: Set<HTMLTagNames>

Defined in

src/core/constants.ts#69


NO_EMPTY_TAGS

Const NO_EMPTY_TAGS: Set<HTMLTagNames>

Defined in

src/core/constants.ts#75


KEY_META

Const KEY_META: "Meta"

Defined in

src/core/constants.ts#77


KEY_BACKSPACE

Const KEY_BACKSPACE: "Backspace"

Defined in

src/core/constants.ts#78


KEY_TAB

Const KEY_TAB: "Tab"

Defined in

src/core/constants.ts#79


KEY_ENTER

Const KEY_ENTER: "Enter"

Defined in

src/core/constants.ts#80


KEY_ESC

Const KEY_ESC: "Escape"

Defined in

src/core/constants.ts#81


KEY_ALT

Const KEY_ALT: "Alt"

Defined in

src/core/constants.ts#82


KEY_LEFT

Const KEY_LEFT: "ArrowLeft"

Defined in

src/core/constants.ts#84


KEY_UP

Const KEY_UP: "ArrowUp"

Defined in

src/core/constants.ts#85


KEY_RIGHT

Const KEY_RIGHT: "ArrowRight"

Defined in

src/core/constants.ts#86


KEY_DOWN

Const KEY_DOWN: "ArrowDown"

Defined in

src/core/constants.ts#87


KEY_SPACE

Const KEY_SPACE: "Space"

Defined in

src/core/constants.ts#88


KEY_DELETE

Const KEY_DELETE: "Delete"

Defined in

src/core/constants.ts#90


KEY_F3

Const KEY_F3: "F3"

Defined in

src/core/constants.ts#92


NEARBY

Const NEARBY: 5

Defined in

src/core/constants.ts#94


ACCURACY

Const ACCURACY: 10

Defined in

src/core/constants.ts#95


COMMAND_KEYS

Const COMMAND_KEYS: string[]

Defined in

src/core/constants.ts#97


BR

Const BR: "br"

Defined in

src/core/constants.ts#111


PARAGRAPH

Const PARAGRAPH: "p"

Defined in

src/core/constants.ts#112


MODE_WYSIWYG

Const MODE_WYSIWYG: 1

WYSIWYG editor mode

Defined in

src/core/constants.ts#117


MODE_SOURCE

Const MODE_SOURCE: 2

html editor mode

Defined in

src/core/constants.ts#122


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#128


IS_IE

Const IS_IE: boolean

Is Internet Explorer

Defined in

src/core/constants.ts#133


TEXT_PLAIN

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

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

Defined in

src/core/constants.ts#141


TEXT_HTML

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

Defined in

src/core/constants.ts#142


TEXT_RTF

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

Defined in

src/core/constants.ts#143


MARKER_CLASS

Const MARKER_CLASS: "jodit-selection_marker"

Defined in

src/core/constants.ts#145


EMULATE_DBLCLICK_TIMEOUT

Const EMULATE_DBLCLICK_TIMEOUT: 300

Defined in

src/core/constants.ts#147


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#160


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#172


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#184


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#196


SAFE_COUNT_CHANGE_CALL

Const SAFE_COUNT_CHANGE_CALL: 10

Defined in

src/core/constants.ts#198


IS_MAC

Const IS_MAC: boolean

Defined in

src/core/constants.ts#200


KEY_ALIASES

Const KEY_ALIASES: IDictionary<string>

Defined in

src/core/constants.ts#204


BASE_PATH

Const BASE_PATH: string

Defined in

src/core/constants.ts#228


TEMP_ATTR

Const TEMP_ATTR: "data-jodit-temp"

Defined in

src/core/constants.ts#258


lang

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

Defined in

src/core/constants.ts#260


CLIPBOARD_ID

Const CLIPBOARD_ID: "clipboard"

Defined in

src/core/constants.ts#262


SOURCE_CONSUMER

Const SOURCE_CONSUMER: "source-consumer"

Defined in

src/core/constants.ts#263


PASSIVE_EVENTS

Const PASSIVE_EVENTS: Set<string>

Defined in

src/core/constants.ts#265

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