I've narrowed it down to something to do with:
<img class="ProseMirror-separator" /> <br>
...when inside a table:
Instructions for reproducing here: https://jsfiddle.net/amk221/L2mqevax/
Hi, I have what's likely a very silly question but haven't been able to find docs/similar recent Gitter posts. I'm trying to write tests for my inputrules by simulating user text input. I first tried @marijnh's suggestion here to no avail - I found using the
view.someProp(handleTextInput) with text that matches input rule regex triggers basic input rules, but using that same function with text that doesn't trigger any input rules doesn't update the view's state at all. I've also tried copying pieces of the tests from
prosemirror-view (and using the
compose function) and am able to edit the DOM, but it doesn't seem like those DOM edit events are being propagated to the view.
My question is: what's the recommended way to simulate users entering input for the purposes of integration testing?
@marijnh, thanks for the advice. I've been tinkering with this for a few days, and the async approach seems to work (wrapping my assertion in a
setTimeout). However, i'd really like to get this to work synchronously via the
flush call. Right now, that call is failing to mark the docview as dirty (
domobserver.js line 173) because
from is always -1. I suspect this is due to my test environment using jsdom, and jsdom not having implementations of certain functions like
markDirty doesn't get called, we skip the
updateState call on line 177.
I don't follow how the
prosemirror-view tests emulate a browser env, and think that's the piece i'm missing here to get things working synchronously. Apologies if my debugging here is totally off, and thanks for the help so far
Hi! I'm trying to understand if there's a way to serialize comments in a node's toDOM, so that they render when the content is unserialized? Looking in DOMSerializer but open to any tips.
Rendering nodes in email, and it's very helpful to have conditional comments to support VML for outlook compatibility. Thank you!
transformPasted. I need to utilise
pluginKey.getState), to store some information about what was pasted, but at that point in time (inside
transformPasted), they don't appear to be accessible in the scope or arguments available. Is my approach wrong here?