Fix line break icon rendering in MS Edge

This commit is contained in:
Thibaud Colas 2018-02-11 21:17:38 +02:00 committed by Matt Westcott
parent 1b9116ed2d
commit 4cab7d67c3
2 changed files with 8 additions and 1 deletions

View file

@ -12,6 +12,7 @@ Object {
},
"enableLineBreak": Object {
"description": "Line break",
"icon": "M.436 633.471l296.897-296.898v241.823h616.586V94.117h109.517v593.796H297.333v242.456z",
},
"entityTypes": Array [
Object {

View file

@ -13,6 +13,9 @@ export { default as EmbedBlock } from './blocks/EmbedBlock';
export { default as ModalWorkflowSource } from './sources/ModalWorkflowSource';
// 1024x1024 SVG path rendering of the "↵" character, that renders badly in MS Edge.
const BR_ICON = 'M.436 633.471l296.897-296.898v241.823h616.586V94.117h109.517v593.796H297.333v242.456z';
/**
* Registry for client-side code of Draftail plugins.
*/
@ -79,7 +82,10 @@ const initEditor = (fieldName, options) => {
onSave={serialiseInputValue}
placeholder={STRINGS.WRITE_HERE}
spellCheck={true}
enableLineBreak={{ description: STRINGS.LINE_BREAK }}
enableLineBreak={{
description: STRINGS.LINE_BREAK,
icon: BR_ICON,
}}
showUndoControl={{ description: STRINGS.UNDO }}
showRedoControl={{ description: STRINGS.REDO }}
maxListNesting={4}