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

Server-side rendering #2336

Closed
xkzl opened this issue Apr 11, 2023 · 3 comments
Closed

Server-side rendering #2336

xkzl opened this issue Apr 11, 2023 · 3 comments

Comments

@xkzl
Copy link

xkzl commented Apr 11, 2023

I was using a WYSIWIG engine and Editor JS looks great..
I would like to switch but I have to check some features.

Is there some way for this JSON output to be converted into HTML... server-side ?
I have some parsing and post-processing done with PHP.
So if the block are rendered at runtime this would make some of my current implementation unusable

I saw some snippet, but I am really not sure this is complete feature
https://devsheet.com/code-snippet/editorjs-blocks-json-to-html-javascript/

@neSpecc
Copy link
Member

neSpecc commented Apr 20, 2023

All you need to do is to iterate through the blocks and pass each of them to a separate template using regular switch-case. Just like in your example

@xkzl
Copy link
Author

xkzl commented Apr 21, 2023

Sorry I forgot to close earlier, that eventually what I ended up doing :)
Many thanks for the reply!

@xkzl xkzl closed this as completed Apr 21, 2023
@pachecotatih
Copy link

how to make html to blocks editorjs?

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

No branches or pull requests

3 participants