Skip to content

Commit

Permalink
added parent div (#416)
Browse files Browse the repository at this point in the history
Signed-off-by: Pritesh Jogdhanakar <129420569+pritesh299@users.noreply.github.com>
  • Loading branch information
pritesh299 authored Jul 22, 2024
1 parent d13b9b9 commit 7856175
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions packages/ui-markdown-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,28 +252,32 @@ export const MarkdownEditor = (props) => {
setShowTableModal={setShowTableModal}
activeButton={props.activeButton || BUTTON_ACTIVE}
/> }
<Editable
id="ap-rich-text-editor"
style={{
<div id='ap-rich-text-editor-parent'
style={{
padding: '0px 20px 10px 20px',
border: '1px solid grey',
borderRadius: '4px',
minWidth: '600px'
}}
readOnly={props.readOnly}
renderElement={renderElement}
renderLeaf={renderLeaf}
placeholder={props.placeholder || 'Enter some text here...'}
spellCheck
autoFocus
onKeyDown={onKeyDown}
onDOMBeforeInput={onBeforeInput}
onCopy={handleCopyOrCut}
onCut={event => handleCopyOrCut(event, true)}
onDragStart={handleDragStart}
onDragOver={event => props.onDragOver ? props.onDragOver(editor, event) : null}
onDrop={handleDrop}
/>
}}>
<Editable
id="ap-rich-text-editor"
style={{
minWidth: '600px'
}}
readOnly={props.readOnly}
renderElement={renderElement}
renderLeaf={renderLeaf}
placeholder={props.placeholder || 'Enter some text here...'}
spellCheck
autoFocus
onKeyDown={onKeyDown}
onDOMBeforeInput={onBeforeInput}
onCopy={handleCopyOrCut}
onCut={event => handleCopyOrCut(event, true)}
onDragStart={handleDragStart}
onDragOver={event => props.onDragOver ? props.onDragOver(editor, event) : null}
onDrop={handleDrop}
/>
</div>
</Slate>
);
};
Expand Down

0 comments on commit 7856175

Please sign in to comment.