Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Data on the clipboard frequently has multiple types. You can see how this works when you use Paste Special in Microsoft Word:

Paste special example

These data types are called MIME types, or sometimes Content-types. Here are some example text types that are defined:

  • text/asp
  • text/css
  • text/html
  • text/javascript
  • text/plain
  • text/richtext

The application that is receiving the paste, such as Microsoft Word or the question editing panel has to know what to do with a particular content type.

Now, consider the fact the text syntax we use (e.g. **text**) formats text using a method called Markdown, which converts the syntax to HTML. Similarly, JIRA uses its own syntax to convert plain text to HTML formatted text.

Now, consider the problem that would be faced: when pasting, Stack Exchange would have to somehow capture the HTML formatted text and then use that to re-generate Markdown syntax, from a source that could be generated from anywhere, not just another Markdown interpreter. Can you imagine how difficult that process might be? This is especially true when you begin to consider CSS: some sites might use <b></b> for bold, and other sites might use CSS and <div></div> for everything, and there are still other ways to do it. HTML and CSS are, themselves, complicated programming languages, not parseable by regex.parseable by regex.

The bottom line is, this would be a very difficult problem. Further, there is a lot of pushback against doing it in the first place (Thanks @HomegrownTomato) this will almost certainly never happen on Stack Exchange.

Data on the clipboard frequently has multiple types. You can see how this works when you use Paste Special in Microsoft Word:

Paste special example

These data types are called MIME types, or sometimes Content-types. Here are some example text types that are defined:

  • text/asp
  • text/css
  • text/html
  • text/javascript
  • text/plain
  • text/richtext

The application that is receiving the paste, such as Microsoft Word or the question editing panel has to know what to do with a particular content type.

Now, consider the fact the text syntax we use (e.g. **text**) formats text using a method called Markdown, which converts the syntax to HTML. Similarly, JIRA uses its own syntax to convert plain text to HTML formatted text.

Now, consider the problem that would be faced: when pasting, Stack Exchange would have to somehow capture the HTML formatted text and then use that to re-generate Markdown syntax, from a source that could be generated from anywhere, not just another Markdown interpreter. Can you imagine how difficult that process might be? This is especially true when you begin to consider CSS: some sites might use <b></b> for bold, and other sites might use CSS and <div></div> for everything, and there are still other ways to do it. HTML and CSS are, themselves, complicated programming languages, not parseable by regex.

The bottom line is, this would be a very difficult problem. Further, there is a lot of pushback against doing it in the first place (Thanks @HomegrownTomato) this will almost certainly never happen on Stack Exchange.

Data on the clipboard frequently has multiple types. You can see how this works when you use Paste Special in Microsoft Word:

Paste special example

These data types are called MIME types, or sometimes Content-types. Here are some example text types that are defined:

  • text/asp
  • text/css
  • text/html
  • text/javascript
  • text/plain
  • text/richtext

The application that is receiving the paste, such as Microsoft Word or the question editing panel has to know what to do with a particular content type.

Now, consider the fact the text syntax we use (e.g. **text**) formats text using a method called Markdown, which converts the syntax to HTML. Similarly, JIRA uses its own syntax to convert plain text to HTML formatted text.

Now, consider the problem that would be faced: when pasting, Stack Exchange would have to somehow capture the HTML formatted text and then use that to re-generate Markdown syntax, from a source that could be generated from anywhere, not just another Markdown interpreter. Can you imagine how difficult that process might be? This is especially true when you begin to consider CSS: some sites might use <b></b> for bold, and other sites might use CSS and <div></div> for everything, and there are still other ways to do it. HTML and CSS are, themselves, complicated programming languages, not parseable by regex.

The bottom line is, this would be a very difficult problem. Further, there is a lot of pushback against doing it in the first place (Thanks @HomegrownTomato) this will almost certainly never happen on Stack Exchange.

Source Link
durron597
  • 11.7k
  • 1
  • 42
  • 69

Data on the clipboard frequently has multiple types. You can see how this works when you use Paste Special in Microsoft Word:

Paste special example

These data types are called MIME types, or sometimes Content-types. Here are some example text types that are defined:

  • text/asp
  • text/css
  • text/html
  • text/javascript
  • text/plain
  • text/richtext

The application that is receiving the paste, such as Microsoft Word or the question editing panel has to know what to do with a particular content type.

Now, consider the fact the text syntax we use (e.g. **text**) formats text using a method called Markdown, which converts the syntax to HTML. Similarly, JIRA uses its own syntax to convert plain text to HTML formatted text.

Now, consider the problem that would be faced: when pasting, Stack Exchange would have to somehow capture the HTML formatted text and then use that to re-generate Markdown syntax, from a source that could be generated from anywhere, not just another Markdown interpreter. Can you imagine how difficult that process might be? This is especially true when you begin to consider CSS: some sites might use <b></b> for bold, and other sites might use CSS and <div></div> for everything, and there are still other ways to do it. HTML and CSS are, themselves, complicated programming languages, not parseable by regex.

The bottom line is, this would be a very difficult problem. Further, there is a lot of pushback against doing it in the first place (Thanks @HomegrownTomato) this will almost certainly never happen on Stack Exchange.