react-editor-js icon indicating copy to clipboard operation
react-editor-js copied to clipboard

EditorJS API is not accessible

Open christoph-kluge opened this issue 3 years ago β€’ 5 comments

Environment

  • @editorjs/editorjs version: 2.23.2
  • react-editor-js version: 2.x

Describe

I wanted to switch from 1.10.0 to 2.x but I cannot access the the editorjs core api anymore. The new README.md states it's not accessible, just an abstracted version of it.

We rely on many features to access and work with the editor instance. It's some kind of sticky header where we add concrete buttons to quickly interact with the editor. Here are some as an example use-cases:

  • Block API -> "insert new block of type X" at the end (or the beginnig)
  • Caret API -> Quickly move to the top/end of the editor
  • Toolbar API -> We have buttons to open/close the toolbox

Was there a specific reason to "remove" this access?

christoph-kluge avatar Apr 06 '22 17:04 christoph-kluge

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.

stale[bot] avatar Apr 16 '22 14:04 stale[bot]

Bump

christoph-kluge avatar Apr 16 '22 14:04 christoph-kluge

@christoph-kluge Hi! First of all, thanks for your interest! πŸ‘‹

Abstracted editor-js is for isomorphic react-editor-js. If you want to access editor-js instance, just use editorCore._editorJS. But I don't recommend it.

I recommend that you create PR that supports API you need. πŸ™ŒπŸ» !

Thanks!

Jungwoo-An avatar Apr 16 '22 17:04 Jungwoo-An

@christoph-kluge @Jungwoo-An Hello. I'm added listed api in https://github.com/Jungwoo-An/react-editor-js/pull/192

proteye avatar Apr 25 '22 08:04 proteye

It does not leave us to implement i18n too.

SalahAdDin avatar Nov 22 '22 13:11 SalahAdDin