Medium.js
Medium.js copied to clipboard
2.0 alpha - undefined on invoke element
Just a heads up, invoke element is returning an undefined in Chrome. Possibly the same as https://github.com/jakiestfu/Medium.js/issues/131
http://cl.ly/image/1S0J1q1o2b2w
document.getElementById('make-my-shit-bold').onmousedown = function() {
article.highlight();
articleMedium.invokeElement('b');
return false;
};
This is now returning Uncaught TypeError: Cannot read property 'remove' of undefined in Chrome.
I encountered this as well, in my instance attributes was not specified because i did not need to set any. You can place a blank {} in attributes or go into Medium.js and change:
Line 557 - remove = attributes.remove || [];
to
Line 557 - remove = ( attributes ? attributes.remove || [] : [] );