Skip to content

Commit

Permalink
feat(TextEditor): Scrollref
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-fx committed Dec 19, 2023
1 parent 76e0236 commit cf77c17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/editors/src/form/TextEditor/TextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const TEXT_EDITOR_PROP_TYPES = {
readOnly: PropTypes.bool,
children: PropTypes.node,
toolbarPortal: PropTypes.any,
scrollRef: PropTypes.any,
};

const TextEditor = ({
Expand All @@ -55,6 +56,7 @@ const TextEditor = ({
acceptedTags = [],
toolbarPosition,
toolbarPortal,
scrollRef,
}) => {
const store = React.useRef({
isFocus: false,
Expand Down Expand Up @@ -240,6 +242,7 @@ const TextEditor = ({
</Box>
)}
<Box
ref={scrollRef}
className={cx(classes.editorContainer, editorContainerClassname)}
style={{ zIndex: 0 }}
>
Expand Down

0 comments on commit cf77c17

Please sign in to comment.