diff --git a/editors/editoria/src/layout/EditorElements.js b/editors/editoria/src/layout/EditorElements.js index 54ebf1ecb23b2267d4ed97b480651f8ac28f1ddb..bcc75c1301d2ccd2b0634b7ac361c0d7b23c05ea 100644 --- a/editors/editoria/src/layout/EditorElements.js +++ b/editors/editoria/src/layout/EditorElements.js @@ -30,7 +30,8 @@ export default css` h4 span::selection, code span::selection, custom-tag-block::selection, - custom-tag-inline::selection { + custom-tag-inline::selection, + figcaption span::selection, { background-color: transparent; } @@ -100,9 +101,35 @@ export default css` margin-right: 0; } - img { - cursor: default; - width: 100%; + figure { + display: flex; + flex-direction: column; + // align-items: center; + // justify-content: center; + // margin: 0px; + + img { + cursor: default; + height: auto; + max-width: 100%; + width: auto; + } + + figcaption { + background: #e2ebff; + padding: 10px; + min-height: 50px; + max-width: 100%; + width: auto; + overflow-y: auto; + + &:focus { + outline: none; + } + &: before { + font-weight: bold; + } + } } sup, diff --git a/wax-prosemirror-components/src/components/comments/CommentBubbleComponent.js b/wax-prosemirror-components/src/components/comments/CommentBubbleComponent.js index 9e9f9818b5293a9c99db74ff407d8481a6eff31b..4dce8b2db5390262770c03b70ea99106a8611299 100644 --- a/wax-prosemirror-components/src/components/comments/CommentBubbleComponent.js +++ b/wax-prosemirror-components/src/components/comments/CommentBubbleComponent.js @@ -41,7 +41,8 @@ const CommentBubbleComponent = ({ (node, from) => { if ( node.type.name === 'math_display' || - node.type.name === 'math_inline' + node.type.name === 'math_inline' || + node.type.name === 'image' ) { allowed = false; }