error messagr:Uncaught TypeError: Cannot read property ‘getRng’ of undefined
I mainly want to get content in tinymce

(function() {
    tinymce.PluginManager.add('Format_Code', function( editor, url ){
        editor.addCommand('FormatCode',function(ui, v){
            console.log(editor.getContent());
        })
    });
    tinymce.exeCommand('FormatCode');
})();

Read more here: add event function to tinymce addcommeand can;t read by exeCommand


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: