Closed jimmycrequer closed 2 years ago
@jimmycrequer Hi! First of all, thanks for your interest! ๐
I'm sorry. Can you show me an example of the use case?
Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@Jungwoo-An Sorry for long wait !
I want to do something like this :
const Editor: FC = (data) => {
const editorJS = useRef<EditorJS>();
const ReactEditorJS = createReactEditorJS();
return (
<>
<ReactEditorJS
onInitialize={(instance) => { editorJS.current = instance }}
defaultValue={data}
tools={EDITOR_JS_TOOLS}
/>
<button onClick={() => { editorJS.current!.blocks.insert() }}>
Add an empty block
</button>
</>
);
};
But with the latest version, we don't have access to blocks
anymore.
What is the recommended approach to handle such case?
Has anyone found a way to use blocks in the most recent version?
Environment
Describe
With the newest version we are no longer able to access the editorJS instance. However, our application relies on having access to that instance to handle some specific logic, such as appending a new empty block on readonly toggle.
What do you recommend to handle such cases?