Test our new composer!

Steps to reproduce

  1. Use Copy Quote on some Topic text.
  2. Open a new reply Composer.
  3. Switch to WYSIWYG mode
  4. Paste
  5. Results in literal characters

This should not literally copy in the characters but deliver a WYSIWYG quote as expected.

2 Likes

Sorry, I can’t reproduce this issue, as this is exactly what I did on my last post and just now with this new quote.

What are the literal characters? Are the quotes being auto-“smart” replaced by your OS?

What browser/OS?

1 Like

Can repro on Android A14, using Chrome. Happens here on Meta.

1 Like

How are you pasting? Are you using the Android IME functionality (the “smart bar”)?

If so, that’s a very hard feature to tweak and this combo is very very likely unfixable, unfortunately - but I’ll do some more digging anyway.

Just as a test/comparison, can you try long pressing and pasting this way - or any way that does not use the IME bar?

1 Like

Hmm… it works if I press the cursor and click on ‘paste’, but doesn’t if I click the prompt at the keyboard bar, or if I go to clipboard > select copied quote.

2 Likes

This was raised before internally; here were my findings at the time:

I’ll try to get some clarity if this is still the case or if there’s anything we can do about it, but putting this here as a reference

transformPasted doesn't catch pasted - #3 by marijn - discuss.ProseMirror

Emphasis mine, the “bright side” doesn’t do us any favor as we’d still want to process this plain text as Markdown.

We don’t have an input rule for [quote] yet, this could help (assuming the IME input does the same as typing each character in the keyboard) IF the resulting pasted text didn’t have that broken closing [/quote] from your first video.

Can you share how is this being pasted (in a code block preferably)? Does the resulting pasted text also have a closing bbcode tag broken in two lines like our internal report?

The markdown looks like:

\[quote="brian, post:58, topic:120"\]

This is a quote

\[/quote\]

This is a test.

Chrome on Android (as PWA)

In WYSIWYG mode it makes this literal.

3 Likes

I see ~two potential paths to address this, I’ll try to explore both during this next week.

As the IME input doesn’t trigger an actual paste event, that makes things very hard.

One path is supporting the [quote] automatic text conversion (ProseMirror/we call that “input rules”), but it’s still possible it won’t work with the IME input mode. Worth a shot anyway.

The other possibility is one I’m even less confident about - it might be possible to hack something by listening to composition events.

Thanks for the reports!

7 Likes

I know there’s active chatter in this topic, but as we have just launched the new composer ( Introducing our new composer, making writing on Discourse easier than ever ), we want to encourage you to treat it like any other feature of Discourse — when you run into issues, please post in the Support or Bug categories, and feel free to suggest improvements in the Feature category.

I’m setting a timer for this topic to close in a few days, which should give ongoing conversations a chance to wrap up.

3 Likes