Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing exception when using Medium.insertHtml #198

Open
samfriend opened this issue Aug 15, 2016 · 1 comment
Open

Throwing exception when using Medium.insertHtml #198

samfriend opened this issue Aug 15, 2016 · 1 comment

Comments

@samfriend
Copy link

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

@samfriend
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant