@shelterzoom/draft-js-import-element
Version:
DraftJS: Import Element to ContentState
109 lines (107 loc) • 1.49 kB
JavaScript
export var INLINE_ELEMENTS = {
a: 1,
abbr: 1,
area: 1,
audio: 1,
b: 1,
bdi: 1,
bdo: 1,
br: 1,
button: 1,
canvas: 1,
cite: 1,
code: 1,
command: 1,
datalist: 1,
del: 1,
dfn: 1,
em: 1,
embed: 1,
i: 1,
iframe: 1,
img: 1,
input: 1,
ins: 1,
kbd: 1,
keygen: 1,
label: 1,
map: 1,
mark: 1,
meter: 1,
noscript: 1,
object: 1,
output: 1,
progress: 1,
q: 1,
ruby: 1,
s: 1,
samp: 1,
script: 1,
select: 1,
small: 1,
span: 1,
strong: 1,
sub: 1,
sup: 1,
textarea: 1,
time: 1,
u: 1,
"var": 1,
video: 1,
wbr: 1,
acronym: 1,
applet: 1,
basefont: 1,
big: 1,
font: 1,
isindex: 1,
strike: 1,
style: 1,
tt: 1
}; // These elements are special because they cannot contain text as a direct
// child (some cannot contain childNodes at all).
export var SPECIAL_ELEMENTS = {
area: 1,
base: 1,
br: 1,
col: 1,
colgroup: 1,
command: 1,
dl: 1,
embed: 1,
head: 1,
hgroup: 1,
hr: 1,
iframe: 1,
img: 1,
input: 1,
keygen: 1,
link: 1,
meta: 1,
ol: 1,
optgroup: 1,
option: 1,
param: 1,
script: 1,
select: 1,
source: 1,
style: 1,
table: 1,
tbody: 1,
textarea: 1,
tfoot: 1,
thead: 1,
title: 1,
tr: 1,
track: 1,
ul: 1,
wbr: 1,
basefont: 1,
dialog: 1,
dir: 1,
isindex: 1
}; // These elements are special because they cannot contain childNodes.
// TODO: This is not an exhaustive list.
export var SELF_CLOSING_ELEMENTS = {
img: 1
};