chore: Refactoring some editor controls (#5023)
* Refactor EmojiMenu * Refactor CommandMenu to functional component * Remove more direct props, refactor to useEditor * Remove hardcoded IDs * Refactor SelectionToolbar to functional component * fix: Positioning of suggestion menu on long paragraphs
This commit is contained in:
@@ -8,6 +8,11 @@ export const PortalContext = React.createContext<
|
||||
HTMLElement | null | undefined
|
||||
>(undefined);
|
||||
|
||||
/**
|
||||
* A hook that returns the portal context value.
|
||||
*/
|
||||
export const usePortalContext = () => React.useContext(PortalContext);
|
||||
|
||||
/**
|
||||
* A portal component that uses context to render into a different dom node
|
||||
* or the root of body if no context is available.
|
||||
|
||||
Reference in New Issue
Block a user