Is there a way to grab the current value of the editor in Gutenburg/Classic WordPress editor? (Not the saved value of the post!)

If someone stumbles upon same issue I found a way to achieve what I wanted (I hope someone is helped by this). This is my solution: getEditedPostContent() contains the temporary post (modified) content: let old_content=””; if ($(‘textarea#content’).length >0) { old_content = $(‘textarea#content’).html(); } else { //”Gutenburg” style (>=WP 5.8) old_content = wp.data.select( ‘core/editor’ ).getCurrentPost().content; if … Read more

Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?

Ok, with many hours of debugging and I finally came to know why it was not working. So everything is supposed to work the way it should be but there was a minor mistake in my JavaScript. Previous JavaScript var counter = 1; document.getElementById(‘add_more_content_block’).addEventListener(‘click’, function(e) { e.preventDefault(); var editor_id = “editor_”+counter; document.getElementById(‘add_content_box’).innerHTML += `<div class=”wp-`+editor_id+`-editor-container”> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)