Skip to content

Commit 9b2e51d

Browse files
committed
fix slate mark rendering
1 parent 2533b69 commit 9b2e51d

File tree

1 file changed

+2
-4
lines changed
  • src/components/Widgets/Markdown/MarkdownControl/VisualEditor

1 file changed

+2
-4
lines changed

src/components/Widgets/Markdown/MarkdownControl/VisualEditor/renderers.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ const Link = props => {
4444
const title = data.get('title');
4545
const link = <a href={url} title={title} {...props.attributes}>{props.children}</a>;
4646
const result = !marks ? link : marks.reduce((acc, mark) => {
47-
const MarkComponent = MARK_COMPONENTS[mark.type];
48-
return <MarkComponent>{acc}</MarkComponent>;
47+
return renderMark({ mark, children: acc });
4948
}, link);
5049
return result;
5150
};
@@ -57,8 +56,7 @@ const Image = props => {
5756
const alt = data.get('alt');
5857
const image = <img src={url} title={title} alt={alt} {...props.attributes}/>;
5958
const result = !marks ? image : marks.reduce((acc, mark) => {
60-
const MarkComponent = MARK_COMPONENTS[mark.type];
61-
return <MarkComponent>{acc}</MarkComponent>;
59+
return renderMark({ mark, children: acc });
6260
}, image);
6361
return result;
6462
};

0 commit comments

Comments
 (0)