You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ever my page mounts the Editor is not focused on. It'd only focus if i click on it.
I'm not sure if this is a bug. but all I've tried to get the editor to auto focus didn't work even after adding the autofocus prop.
From what I noticed it only works when there is already a block in the editor, if you have an empty editor than it doesn't focus.
I believe it's also important to have the initial focus when the editor is empty so the user can start typing right away.
You can workaround that setting an empty paragraph as default data to start the editor.
Maybe this is even something that could become the fix for the issue, having an empty paragraph as default when default data is empty. (🤔?)
I'm new to the lib so it would be nice to have some input from others on it.
When ever my page mounts the Editor is not focused on. It'd only focus if i click on it.
I'm not sure if this is a bug. but all I've tried to get the editor to auto focus didn't work even after adding the autofocus prop.
<YooptaEditor
placeholder="Start creating"
plugins={plugins}
editor={editor}
value={value}
onChange={onChange}
tools={TOOLS}
style={{ width: "100%" }}
className="text-small-xl border w-full rounded p-2 cursor-text"
marks={MARKS}
autoFocus
/>
btw great editor
guys😌
The text was updated successfully, but these errors were encountered: