Skip to content

Files

Latest commit

 

History

History

observe-typing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Observe Typing

<ObserveTyping /> is a component used in managing the editor's internal typing flag. When used to wrap content, it observes keyboard and mouse events to set and unset the typing flag. The typing flag is used in considering whether the block border and controls should be visible. While typing, these elements are hidden for a distraction-free experience.

Usage

Wrap the component where blocks are to be rendered with <ObserveTyping />:

function VisualEditor() {
	return (
		<ObserveTyping>
			<MyInput />
		</ObserveTyping>
	);
}