You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when I try to insertHtml('<ul><li></li></ul>'); to a Medium.js instance after calling medium.focus() off a button click, the content is always prepended. Not sure what's exactly going on, but I figured it may be because calling medium.focus() results in the cursor unconditionally going to the beginning of the text area.
I've made a video showcasing what's going on here:
I would be happy to open a PR to get this fixed ASAP if someone has an inkling of suspicion as to what may be going on here. The example on the GH page seems to work fine for me so perhaps it's some nuance of my local setup? I am including rangy (both core and the other sub lib) as well as undo.js.
The text was updated successfully, but these errors were encountered:
Upon a bit more investigation, it seems like span#wedge element gets placed at the start of my content div in Medium.Injector.prototype.inject when this.insertHtml is called. Strange because that will then make parent.insertBefore(html[i], wedge); insert the list at the beginning.
I noticed that when I try to
insertHtml('<ul><li></li></ul>');
to aMedium.js
instance after callingmedium.focus()
off a button click, the content is always prepended. Not sure what's exactly going on, but I figured it may be because callingmedium.focus()
results in the cursor unconditionally going to the beginning of the text area.I've made a video showcasing what's going on here:
https://www.opentest.co/share/c509f0d0aabe11e69e53f587dba00be5
I would be happy to open a PR to get this fixed ASAP if someone has an inkling of suspicion as to what may be going on here. The example on the GH page seems to work fine for me so perhaps it's some nuance of my local setup? I am including
rangy
(bothcore
and the other sub lib) as well asundo.js
.The text was updated successfully, but these errors were encountered: