Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for EditorJS nesting #1055

Closed
wants to merge 3 commits into from

Conversation

hata6502
Copy link
Contributor

@hata6502 hata6502 commented Mar 10, 2020

By nesting Editor.js, it can design layouts more flexibly.
I fixed some event handlers to nest Editor.js.

Demo
https://codesandbox.io/s/editor-js-grid-nest-ro2uz?fontsize=14&hidenavigation=1&theme=dark

@hata6502
Copy link
Contributor Author

#708
#803

@hata6502 hata6502 marked this pull request as ready for review March 10, 2020 11:50
@hata6502
Copy link
Contributor Author

hata6502 commented Mar 14, 2020

I saw the proposal that make Editor.js nestable, some times.
But, I want to keep Editor.js simple.

So, I developed the plugin to nest Editor.js instance.
https://ro2uz.csb.app/
https://www.npmjs.com/package/editor-js-grid
This solution makes Editor.js nestable with no Editor.js's function extension.

But, tiny fixes were needed to event handlers, so I opened this PR.
Thank you for maintaining Editor.js, and I love Editor.js :)

@hata6502
Copy link
Contributor Author

hata6502 commented Mar 15, 2020

This PR may be not needed by using Shadow DOM or iframe in my plugin.
I'll try it as another solution.

@hata6502 hata6502 closed this Apr 23, 2020
@hata6502 hata6502 deleted the bugfix/fix-for-nesting branch April 23, 2020 02:33
@Xerathron
Copy link

@hata6502 Unfortunately your links run into a 404. I would be very pleased if you can fix this :) Greetings

@hata6502 hata6502 restored the bugfix/fix-for-nesting branch July 6, 2020 04:59
@hata6502
Copy link
Contributor Author

hata6502 commented Jul 6, 2020

Sorry, I couldn't find another solution.
So, I reopened it.

@hata6502 hata6502 reopened this Jul 6, 2020
@hata6502
Copy link
Contributor Author

@Xerathron
Sorry, I needed to remove editor-js-grid, so the links are 404.
But, this PR is useful for another issue: #1212

@gohabereg gohabereg changed the base branch from master to next July 26, 2020 17:26
@gohabereg
Copy link
Member

Hi there
We have a proposal for custom layouts — #836.
We think nesting Editor.js instances is not the best solution for this issue. This feature should be designed from scratch and implemented as part of the core. If you would like to contribute we are happy to help!

I'm closing PR and related issues for now.

@hata6502
Copy link
Contributor Author

@gohabereg
Thank you for considering about layout scheme!
I think nesting Editor.js instances is difficult to use and low efficiently way, too.

@hata6502
Copy link
Contributor Author

hata6502 commented Aug 29, 2020

Editor.js can be nested by using iframe!
So this PR is not needed.
Thank you :)

https://github.com/hata6502/editorjs-inline
https://hata6502.github.io/editorjs-inline/

@miko007
Copy link

miko007 commented Nov 5, 2020

@hata6502 do you think it is possible to apply those fixes without changing editorjs itself? like through the api or class inheritance or something?

i really need this functionality, and everything would be fine if your fixes were applied. but i certainly can not run a modified editorjs version...

@hata6502
Copy link
Contributor Author

hata6502 commented Nov 5, 2020

@miko007
I think Editor.js nesting is not an efficient way.
I've seen some bugs at event listener and drag'n'drop, and so on by Editor.js nesting.

You can try using it:

yarn add impact-blue/editor.js#fix-for-nesting

@miko007
Copy link

miko007 commented Nov 5, 2020

thank you for your suggestion. i certainly could use your repo, but i imagine you do not fancy maintaining it, just for the sake of one guy using it.

i am not in need of an efficient solution, but one that works. On the other hand, if those changes do not interfere with regular editorJS usage, i do not see any reason to not merge them, as it would not hurt somebody.

For my usecase this is the ideal solution, as all other solutions just do html/css trickery for achieving columns, but i need a true nested editor with nested blocks, because i do not use editorjs to generate HTML but PDFs, where flexbox etc. is useless.

With your changes i am able to achieve all goals for the project. Nevertheless it would be nice to use the upstream version of editorjs.

@hata6502 hata6502 mentioned this pull request Nov 24, 2020
@hata6502
Copy link
Contributor Author

editor-js-grid is revived as editorjs-layout!
See: https://github.com/hata6502/editorjs-layout

@evanjmg
Copy link

evanjmg commented Jan 27, 2022

Could this be revisited resolve this issue with Shadow dom etc? #1881 @hata6502 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants