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
ES
Const
ES: "es5"
| "es2015"
| "es2018"
| "es2021"
Defined in
IS_ES_MODERN
Const
IS_ES_MODERN: boolean
Defined in
IS_ES_NEXT
Const
IS_ES_NEXT: boolean
Defined in
IS_PROD
Const
IS_PROD: boolean
Defined in
IS_TEST
IS_TEST: boolean
Defined in
FAT_MODE
Const
FAT_MODE: boolean
Defined in
HOMEPAGE
Const
HOMEPAGE: string
Defined in
TOKENS
Const
TOKENS: Record
<string
, string
>
Defined in
INVISIBLE_SPACE
Const
INVISIBLE_SPACE: ""
Defined in
NBSP_SPACE
Const
NBSP_SPACE: " "
Defined in
globalWindow
Const
globalWindow: typeof window
Defined in
globalDocument
Const
globalDocument: Document
Defined in
IS_BLOCK
Const
IS_BLOCK: RegExp
Defined in
IS_INLINE
Const
IS_INLINE: RegExp
Defined in
LIST_TAGS
Const
LIST_TAGS: Set
<"ul"
| "ol"
>
Defined in
INSEPARABLE_TAGS
Const
INSEPARABLE_TAGS: Set
<HTMLTagNames
>
Defined in
NO_EMPTY_TAGS
Const
NO_EMPTY_TAGS: Set
<HTMLTagNames
>
Defined in
KEY_META
Const
KEY_META: "Meta"
Defined in
KEY_BACKSPACE
Const
KEY_BACKSPACE: "Backspace"
Defined in
KEY_TAB
Const
KEY_TAB: "Tab"
Defined in
KEY_ENTER
Const
KEY_ENTER: "Enter"
Defined in
KEY_ESC
Const
KEY_ESC: "Escape"
Defined in
KEY_ALT
Const
KEY_ALT: "Alt"
Defined in
KEY_LEFT
Const
KEY_LEFT: "ArrowLeft"
Defined in
KEY_UP
Const
KEY_UP: "ArrowUp"
Defined in
KEY_RIGHT
Const
KEY_RIGHT: "ArrowRight"
Defined in
KEY_DOWN
Const
KEY_DOWN: "ArrowDown"
Defined in
KEY_SPACE
Const
KEY_SPACE: "Space"
Defined in
KEY_DELETE
Const
KEY_DELETE: "Delete"
Defined in
KEY_F3
Const
KEY_F3: "F3"
Defined in
NEARBY
Const
NEARBY: 5
Defined in
ACCURACY
Const
ACCURACY: 10
Defined in
COMMAND_KEYS
Const
COMMAND_KEYS: string
[]
Defined in
BR
Const
BR: "br"
Defined in
PARAGRAPH
Const
PARAGRAPH: "p"
Defined in
MODE_WYSIWYG
Const
MODE_WYSIWYG: 1
WYSIWYG editor mode
Defined in
MODE_SOURCE
Const
MODE_SOURCE: 2
html editor mode
Defined in
MODE_SPLIT
Const
MODE_SPLIT: 3
Source code editor and HTML editor both like
See
http://getuikit.com/docs/htmleditor.html|this
Defined in
IS_IE
Const
IS_IE: boolean
Is Internet Explorer
Defined in
TEXT_PLAIN
Const
TEXT_PLAIN: "text"
| "text/plain"
For IE11 it will be 'text'. Need for dataTransfer.setData
Defined in
TEXT_HTML
Const
TEXT_HTML: "html"
| "text/html"
Defined in
TEXT_RTF
Const
TEXT_RTF: "rtf"
| "text/rtf"
Defined in
MARKER_CLASS
Const
MARKER_CLASS: "jodit-selection_marker"
Defined in
EMULATE_DBLCLICK_TIMEOUT
Const
EMULATE_DBLCLICK_TIMEOUT: 300
Defined in
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
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
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
><h1>test</h1>
Defined in
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
SAFE_COUNT_CHANGE_CALL
Const
SAFE_COUNT_CHANGE_CALL: 10
Defined in
IS_MAC
Const
IS_MAC: boolean
Defined in
KEY_ALIASES
Const
KEY_ALIASES: IDictionary
<string
>
Defined in
BASE_PATH
Const
BASE_PATH: string
Defined in
TEMP_ATTR
Const
TEMP_ATTR: "data-jodit-temp"
Defined in
lang
Const
lang: IDictionary
<IDictionary
<string
>> = {}
Defined in
CLIPBOARD_ID
Const
CLIPBOARD_ID: "clipboard"
Defined in
SOURCE_CONSUMER
Const
SOURCE_CONSUMER: "source-consumer"
Defined in
PASSIVE_EVENTS
Const
PASSIVE_EVENTS: Set
<string
>
Defined in
SET_TEST
SET_TEST(): boolean
Returns
boolean
Defined in
INVISIBLE_SPACE_REG_EXP
INVISIBLE_SPACE_REG_EXP(): RegExp
Returns
Defined in
INVISIBLE_SPACE_REG_EXP_END
INVISIBLE_SPACE_REG_EXP_END(): RegExp
Returns
Defined in
INVISIBLE_SPACE_REG_EXP_START
INVISIBLE_SPACE_REG_EXP_START(): RegExp
Returns
Defined in
SPACE_REG_EXP
SPACE_REG_EXP(): RegExp
Returns
Defined in
SPACE_REG_EXP_START
SPACE_REG_EXP_START(): RegExp
Returns
Defined in
SPACE_REG_EXP_END
SPACE_REG_EXP_END(): RegExp
Returns
Defined in
jodit/src/core/constants.ts:40