From eeaea477f21c87127bb6e3e969a2204f8b7f00b4 Mon Sep 17 00:00:00 2001 From: dinghongyu Date: Thu, 31 Dec 2020 11:30:36 +0800 Subject: [PATCH] chore: pass parameter --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index b341373..75a4c68 100644 --- a/src/index.js +++ b/src/index.js @@ -26,7 +26,7 @@ export const convertHTMLToRaw = (HTMLString, options, source) => { options = { ...defaultConvertOptions, ...options } try { - const contentState = convertFromHTML(getFromHTMLConfig(options, source))(HTMLString) + const contentState = convertFromHTML(getFromHTMLConfig(options, source))(HTMLString, options) return convertToRaw(contentState) } catch (error) { console.warn(error) @@ -55,7 +55,7 @@ export const convertHTMLToEditorState = (HTMLString, editorDecorators, options, options = { ...defaultConvertOptions, ...options } try { - return EditorState.createWithContent(convertFromHTML(getFromHTMLConfig(options, source))(HTMLString), editorDecorators) + return EditorState.createWithContent(convertFromHTML(getFromHTMLConfig(options, source))(HTMLString, options), editorDecorators) } catch (error) { console.warn(error) return EditorState.createEmpty(editorDecorators)