Adding proper copy/paste of latex code

Made another PR, this time to add something I always wanted: proper copy/paste of latex code: highlight rendered latex in a post, paste in editor and get proper latex, see:

@sam The Discourse “quote” functionality is also improved, but has a quirk: while it does insert the proper latex code for the highlighted equation (hence I take the Discourse code relies on clipboard features), it still adds the plain-text version as well and does so twice, which is clearly a bug. I can look into this and try to fix it but I could use a pointer from you for the Discourse code that handles the “Quote” feature for highlighted text to save me some time.

3 Likes

Oh, how timely, maybe the work @martin did here can help answer this?

1 Like

Not sure if it’s related to my fix that @sam pointed out, but I can check. Would you mind providing some Latex code that I can use to try and reproduce? A screen recording of what is happening would be very useful too.

1 Like