@eviltrout Thanks for the help. I managed to get this “working” tonight… though it is incredibly slow while typing in the preview edit.The call to the js library that performs the markup–>svg transform is obviously expensive.
At this point I think my strategy is flawed, as I can’t be rebuilding the svg output on every keystroke, even if the diagram markup isn’t modified. Perhaps I can throttle the call somehow and only rebuild the diagram output after some small delay in keystrokes?
Any ideas to improve are much appreciated!
Latest code is here: GitHub - nskerl/discourse-sequence-diagram · GitHub