Remove IE11-only Draftail configuration

pull/8009/head
Thibaud Colas 2022-01-31 23:57:50 +00:00
rodzic 9ecc105178
commit 9acce41fec
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
import { DraftailEditor } from 'draftail'; import { DraftailEditor } from 'draftail';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { IS_IE11, STRINGS } from '../../config/wagtailConfig'; import { STRINGS } from '../../config/wagtailConfig';
import Icon from '../Icon/Icon'; import Icon from '../Icon/Icon';
@ -115,8 +115,7 @@ const initEditor = (selector, options, currentScript) => {
showUndoControl: { description: STRINGS.UNDO }, showUndoControl: { description: STRINGS.UNDO },
showRedoControl: { description: STRINGS.REDO }, showRedoControl: { description: STRINGS.REDO },
maxListNesting: 4, maxListNesting: 4,
// Draft.js + IE 11 presents some issues with pasting rich text. Disable rich paste there. stripPastedStyles: false,
stripPastedStyles: IS_IE11,
...options, ...options,
blockTypes: blockTypes.map(wrapWagtailIcon), blockTypes: blockTypes.map(wrapWagtailIcon),
inlineStyles: inlineStyles.map(wrapWagtailIcon), inlineStyles: inlineStyles.map(wrapWagtailIcon),