Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defaultSlate,
reducedSlate,
spacer,
imagePlugin({ imageUpload: fakeImageUploadService('/images/react.png') }),
video,
divider,
html5video,
customContentPlugin(),
customContentPluginWithListField(),
],
layout: [
background({
defaultPlugin: defaultSlate,
imageUpload: fakeImageUploadService('/images/sea-bg.jpg'),
enabledModes:
ModeEnum.COLOR_MODE_FLAG |
ModeEnum.IMAGE_MODE_FLAG |
ModeEnum.GRADIENT_MODE_FLAG,
}),
customLayoutPlugin(),
customLayoutPluginWithInitialState(),
],
// If you pass the native key the editor will be able to handle native drag and drop events (such as links, text, etc).
// The native plugin will then be responsible to properly display the data which was dropped onto the editor.
native,
};
const plugins: Plugins = {
content: [
slatePlugin,
spacer,
imagePlugin({ imageUpload: fakeImageUploadService('/images/react.png') }),
video,
divider,
html5video,
customContentPlugin(),
],
layout: [
background({
defaultPlugin: slatePlugin,
imageUpload: fakeImageUploadService('/images/sea-bg.jpg'),
enabledModes:
ModeEnum.COLOR_MODE_FLAG |
ModeEnum.IMAGE_MODE_FLAG |
ModeEnum.GRADIENT_MODE_FLAG,
}),
parallax({ defaultPlugin: slatePlugin }),
customLayoutPlugin({ defaultPlugin: slatePlugin }),
],
// If you pass the native key the editor will be able to handle native drag and drop events (such as links, text, etc).
// The native plugin will then be responsible to properly display the data which was dropped onto the editor.
native,
};
const editor = new Editor({
plugins: plugins,
// pass the content states
editables: [
slatePlugin,
spacer,
imagePlugin({ imageUpload: fakeImageUploadService('/images/react.png') }),
video,
divider,
html5video,
customContentPlugin(),
],
layout: [
background({
defaultPlugin: slatePlugin,
imageUpload: fakeImageUploadService('/images/sea-bg.jpg'),
enabledModes:
ModeEnum.COLOR_MODE_FLAG |
ModeEnum.IMAGE_MODE_FLAG |
ModeEnum.GRADIENT_MODE_FLAG,
}),
parallax({ defaultPlugin: slatePlugin }),
customLayoutPlugin({ defaultPlugin: slatePlugin }),
],
// If you pass the native key the editor will be able to handle native drag and drop events (such as links, text, etc).
// The native plugin will then be responsible to properly display the data which was dropped onto the editor.
native,
};
const editor = new Editor({
plugins: plugins,
// pass the content states
editables: [
...content,
// creates an empty state, basically like the line above
spacer,
imagePlugin({ imageUpload: fakeImageUploadService('/images/react.png') }),
video,
divider,
html5video,
customContentPlugin(),
customContentPluginWithListField(),
],
layout: [
background({
defaultPlugin: defaultSlate,
imageUpload: fakeImageUploadService('/images/sea-bg.jpg'),
enabledModes:
ModeEnum.COLOR_MODE_FLAG |
ModeEnum.IMAGE_MODE_FLAG |
ModeEnum.GRADIENT_MODE_FLAG,
}),
customLayoutPlugin(),
customLayoutPluginWithInitialState(),
],
// If you pass the native key the editor will be able to handle native drag and drop events (such as links, text, etc).
// The native plugin will then be responsible to properly display the data which was dropped onto the editor.
native,
};
reducedSlate,
spacer,
imagePlugin({ imageUpload: fakeImageUploadService('/images/react.png') }),
video,
divider,
html5video,
customContentPlugin(),
customContentPluginWithListField(),
],
layout: [
background({
defaultPlugin: defaultSlate,
imageUpload: fakeImageUploadService('/images/sea-bg.jpg'),
enabledModes:
ModeEnum.COLOR_MODE_FLAG |
ModeEnum.IMAGE_MODE_FLAG |
ModeEnum.GRADIENT_MODE_FLAG,
}),
customLayoutPlugin(),
customLayoutPluginWithInitialState(),
],
// If you pass the native key the editor will be able to handle native drag and drop events (such as links, text, etc).
// The native plugin will then be responsible to properly display the data which was dropped onto the editor.
native,
};
content: [
slatePlugin,
spacer,
imagePlugin({ imageUpload: fakeImageUploadService('/images/react.png') }),
video,
divider,
html5video,
customContentPlugin(),
],
layout: [
background({
defaultPlugin: slatePlugin,
imageUpload: fakeImageUploadService('/images/sea-bg.jpg'),
enabledModes:
ModeEnum.COLOR_MODE_FLAG |
ModeEnum.IMAGE_MODE_FLAG |
ModeEnum.GRADIENT_MODE_FLAG,
}),
parallax({ defaultPlugin: slatePlugin }),
customLayoutPlugin({ defaultPlugin: slatePlugin }),
],
// If you pass the native key the editor will be able to handle native drag and drop events (such as links, text, etc).
// The native plugin will then be responsible to properly display the data which was dropped onto the editor.
native,
};
const editor = new Editor({
plugins: plugins,
// pass the content states
editables: [
...content,