Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private getEditorOptions(): EditorOptions {
let { plugins, viewState, undo, hyperlinkToolTipCallback, defaultFormat } = this.props;
let allPlugins: EditorPlugin[] = [new ContentEdit(), new HyperLink(hyperlinkToolTipCallback), new Paste(true /*useDirectPaste*/)];
if (plugins) {
allPlugins = allPlugins.concat(plugins);
}
let initialContent = HtmlSanitizer.convertInlineCss(viewState.content);
let options: EditorOptions = {
plugins: allPlugins,
defaultFormat: defaultFormat,
undo: undo,
initialContent: initialContent
};
return options;
}