Trying to create a theme component that shows when text is pasted

@Andrew_Rowe Interesting experiment! However, this approach has limitations:

  • The Theme Component only detects clipboard paste events in the traditional Markdown composer.
  • Users can bypass it by typing, using another editor, or submitting through the API.
  • Bots can create posts directly through the Discourse API without triggering the paste listener.
  • Highlighting pasted text might discourage some users, but it won’t prevent spam.

My recommendation: Use Discourse’s built-in trust levels, rate limits, spam detection and moderation tools. Treat pasted-text highlighting as a visual feature, not a security measure.

A plugin would be needed for deeper server-side integration, but even that cannot reliably distinguish pasted text from manually typed text.