Throwing exception when using Medium.insertHtml
samfriend opened this issue · comments
medium.js Uncaught TypeError: Cannot read property 'length' of null
if i type this in browser console
medium.insertHtml('123456');
it throws error
if i trigger this from a button click, it works
what is Medium.activeElement for?
the insert() method needs Medium.activeElement === this.medium.element
but if i call from console or other class (e.g. fileupload) , the activeElement is null thus throws error
focus() method also wont set the activeElement