# Users pasting unformatted code results in unwanted styles

**URL:** <https://meta.discourse.org/t/users-pasting-unformatted-code-results-in-unwanted-styles/29120>\
**Category:** Product Support\
**Created:** [Maio 22, 2015, 11:56am UTC](https://meta.discourse.org/t/users-pasting-unformatted-code-results-in-unwanted-styles/29120 "2015-05-22T11:56:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![tDo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdo/32/115520_2.png) [@tDo](https://meta.discourse.org/u/tDo)\
**Post date:** [Maio 23, 2015, 9:20am UTC](https://meta.discourse.org/t/users-pasting-unformatted-code-results-in-unwanted-styles/29120/5 "2015-05-23T09:20:09Z")

</div>

While it’s true that it would be very hard to impossible to actually detect something like code in pasted content and educating a user about that kind of content-handling would probably suffice it could still be possible to add some kind of “weird content paste”-detection. Let my try to explain:

Something like code-blocks is typically pasted into a response. Since discourse is automatically doing a markdown transformation for the live-preview it should be possible to verify what kind of content has been pasted. If it for example consists of mostly headlines (e.g. 10 headlines and like only 2 paragraphs) it could be possible that a user pasted text which should actually be formatted in a different way (in this case as a code-block). The editor could then show a small notification telling the user that some more work should be done, before actually saving the message.

Still this kind of detection would be very hard to implement and might even use lots of computing resources on the client, which especially for mobile devices might just be too much.

---

_[View the full topic](https://meta.discourse.org/t/users-pasting-unformatted-code-results-in-unwanted-styles/29120)._
