Within the old SEO module there are the following lines in the admin.js:
var title = $('#title').val().trim(); var content = $('#content').val().trim();
Those fields do not exist in Gutenberg anymore. I have tried to find the correct way to do this in the docs, but no luck so far. I have found:
But both seem to be empty arrays in my case (although this post has content). I basically just need a way to get the textual contents of all blocks (and maybe seperatly from the main post title if this is possible). Who knows how to do that?