Clipboard mimetype text/html

I would like to be able to paste text to Tiddlywiki as a particular mimetype - namely text/html. I think this would be done in a specified context - like pasting into a textbox that was created to accept pasting for that mimetype, via a dropdown or something like that.

Setting a Tiddler to the text/html mimetype might make the Tiddler accept pasting tables from the web as html.

If there is another way to do this in TiddlyWiki, then I’d like to find out before I make an actual feature request. thanks for any help.

Examples of mimetype.

Good Example Tables to Test Translation

Pasting a web table into Google Docs Sheets for instance, pastes using the text/html mimetype.

Additionaly, you can see a very specific example on the Linux command line.
  • wl-paste --type text/html Shows the html tags from the pasted clipboard table
  • wl-paste --type text/plain Shows only tabulated text from the exact same data

Incidentally, this discussion platform also takes the mimetype, and goes so far as to convert it to markup, (although it fails to translate the merges correctly.)

I tried to use a textarea html tag, and an input html tag to specify the type as text/html, so I could paste a table that way. However that does not work.

If you drop a name.txt file in tiddlywiki it is added with text/plain type.

I expect html file may be similar but complex ones could cause problems.

ctrl-v out side a text field will paste into tiddlywiki.

Try the different combinartions and you may find it works for you.

With research a much better answer can be given, of course.

I am asking about a way to do it from the clipboard.

Mind you, pasting the html mimetype into text editors does not work either. It works with spreadsheet applications, like OpenOffice, LibreOffice, and Google Docs. It also works with that clipboard cli program.

Incidentally, this discussion platform accepts pasted table data in the text/html mimetype if you try to copy/paste a table into the editor. Now, it also happens to mess up the table merges, and screw up the data when trying to convert it to markup. But that’s another story.

  • If you copy some content from this thread using CTRL-C and
  • then switch to tiddlywiki.com
  • Use CTRL-V you will get an import dialogue with 2 possibilities

If you expand the info you will see this. There is an HTML version and a text-version.
You can select the one you need.

1 Like

It’s so simple, I didn’t know where to find it. I’m glad I didn’t write it up as a feature request.

Thank you for understanding the question, and taking the time to answer it.

Obviously, I was trying to paste it into a new tiddler’s editor box.

I was also trying to create textarea and input boxes with the type attribute, and it was there the whole time.

1 Like

OK, I didn’t understand this. I already marked pmario as the solution, but you were right.

(Perhaps that’s why pmario was so illustrative in his response.)