Back in TMCE days, we could easily get editor content with editor.getContent()
. However in new Gutenberg editor, I can't find a method to do that.
I need all editor content as HTML (the way it will be saved in database).
I found wp.block.serialize()
method which sounds promising. But seems to need blocks (as a parameter). So I'm kind of stuck.