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 need to create a custom embedded object that will appear within the flow of rich text. For this I've extended Embed from Quill.import('blots/embed') and it all seems to work fine.
However, my custom embedded object contains an <input/> field inside it, in which the user can enter plaintext using normal browser UI rules.
I have defined events and callbacks for cursor enter,exit from left,right, and I have it working nicely so that as the user presses arrow keys, the cursor and focus leave Quill and jump inside this sub-field, then when the cursor reaches the end of the <input/>, it jumps back into Quill where it left off. So to the user it should feel pretty seamless.
Unfortunately, Quill insists on listening to the input while the sub-field has the focus, and I can't for the life of me work out how to get to ignore it. As a result, Quill is moving the "cursor" (which isn't visible because Quill isn't focussed) and jumping out of the <input/> field without the field's say so.
Is this something that can be done or am I better off looking for a Quill alternative?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need to create a custom embedded object that will appear within the flow of rich text. For this I've extended Embed from Quill.import('blots/embed') and it all seems to work fine.
However, my custom embedded object contains an
<input/>
field inside it, in which the user can enter plaintext using normal browser UI rules.I have defined events and callbacks for cursor enter,exit from left,right, and I have it working nicely so that as the user presses arrow keys, the cursor and focus leave Quill and jump inside this sub-field, then when the cursor reaches the end of the
<input/>
, it jumps back into Quill where it left off. So to the user it should feel pretty seamless.Unfortunately, Quill insists on listening to the input while the sub-field has the focus, and I can't for the life of me work out how to get to ignore it. As a result, Quill is moving the "cursor" (which isn't visible because Quill isn't focussed) and jumping out of the
<input/>
field without the field's say so.Is this something that can be done or am I better off looking for a Quill alternative?
Beta Was this translation helpful? Give feedback.
All reactions