dragging stuff into tw

135 views
Skip to first unread message

BurningTreeC

unread,
Feb 27, 2018, 9:50:45 AM2/27/18
to TiddlyWiki
Hi community,

I want to share what I've discovered

You may already know this, but for me it's new!

Maybe you can share some interesting things that are possible with it:

I was translating something in a well-known online translator which shows a table with some informations below the translation

I somehow selected the table and dragged it to my wiki then I was curious enough to import and voilá there's the whole table in html in my wiki, beautifully rendered

I didn't know that that works and I'm impressed
Do you know other examples where this works that may be useful?

BTC

Furicle

unread,
Feb 27, 2018, 10:03:23 AM2/27/18
to TiddlyWiki
What I found recently I didn't know, was you can 'paste' a file into TW.

e.g. with a picture open, select all, copy, change to TW, click on an empty spot on the background and paste.

In retrospect maybe that's obvious, but it wasn't at the time :-)

@TiddlyTweeter

unread,
Feb 27, 2018, 10:28:05 AM2/27/18
to TiddlyWiki
Probably one of the most obvious, though often overlooked, drag & drop things is dragging a tag between TiddlWikis.

Its awesome.

The functionality of native drag-n-drop import in TiddlyWiki FAR exceeds any competition.

It should be a major selling point.

Josiah

Mark S.

unread,
Feb 27, 2018, 10:29:58 AM2/27/18
to TiddlyWiki
Interesting -- I'm sure I've tried that in the past and it didn't work.

You could use TW this way to replace the much-loved Scrapbook extension that disappeared in the great Foxaclypse.

The main problems are that:

1. It's all HTML which consumes 3x more space than mark-up
2. Images are links to sites which can go away at any time

-- Mark

BurningTreeC

unread,
Feb 27, 2018, 10:59:11 AM2/27/18
to TiddlyWiki
@Furicle , I tried it, it's pretty cool. If I copy a picture from my file manager I only get the path into my wiki

I think with specifying a deserializer I could make it possible that it creates a tiddler with that path in the _canonical_uri field
If I drag the picture into tw it gets saved within my wiki as a picture and not kept external - 90% of the time I want it external

@TiddlyTweeter , I tried that now for the first time, had no idea

It's very useful

@Mark S. , I think with customized deserializers one could tune it to behave how one wants

Do you think it's possible to build something that uses a deserializer and the text-slicer plugin to create something from the imported html?

@TiddlyTweeter

unread,
Feb 27, 2018, 11:02:01 AM2/27/18
to TiddlyWiki
D-n-d highlighted of external sites doesn't always work--but often it does.

For instance on the WikiPedia issue we were recently discussing TiddlyWiki can import highlighted text from WikiPedia. It comes in as raw HTML, obviously.

Josiah

BTC:

I didn't know that that works and I'm impressed
Do you know other examples where this works that may be useful?

Mark S. wrote:

@TiddlyTweeter

unread,
Feb 27, 2018, 11:49:48 AM2/27/18
to TiddlyWiki
BurningTreeC wrote:
Do you think it's possible to build something that uses a deserializer and the text-slicer plugin to create something from the imported html?

This is the kind of thing that BJs TiddlyClip is also into. Well worth a serious look http://tiddlyclip.tiddlyspot.com/#New%20to%20TiddlyClip

Mark S.

unread,
Feb 27, 2018, 11:59:03 AM2/27/18
to TiddlyWiki
@ BTC

Do you know where the image deserializer/handler is?

We've been told that the path information is unavailable to TW thanks to security built into the browser. But clearly the image name is available, so if you used a standard naming convention, eg. abc_myimage.jpg then maybe your custom deserializer could use the "abc" part to assign a path on the fly. Like you, I've long wanted the ability to drag and drop an image and have a  _canonical_uri tiddler generated. Oh, and you're supposed to be able to do this with the desktop version and a plugin, but when I tried it there was still a bug in the desktop and it didn't work. That was a couple months back.

Looking at the HTML deserializer, I see that it doesn't do much. It occurs to me that you could pass it to a javascript function that makes it into it's own dom tree (can't think of the function name at the moment). Then parse the tree and traverse it, turning various tags into TW5 text.  A bit of work.

-- Mark

Michael Wiktowy

unread,
Feb 27, 2018, 8:45:05 PM2/27/18
to TiddlyWiki
I was just looking at all the different ways to import stuff and it seems very dependent on where it is coming from and the method of import.

Dragging and dropping seems to keep the source formatting ... which can work for or against you.

Works great on tables from an html doc although, with a mountain of styles in the tags, it is a bit awkward to edit after. Not so great dragging highlighted text from a PDF as Tiddlywiki (or most probably the browser underneath) doesn't know how to render a PDF fragment.

Copying and pasting seems to work well for importing images that were embedded in PDFs.

On top of that, you can cut out all the formatting by opening a new tiddler and pasting in to the edit box directly. But then you have the work to reapply all the formatting with Wikitext ... but it ends up being the most compact and editable.

So lots of trade offs depending on what you want to do with the content after.

/Mike

TonyM

unread,
Feb 28, 2018, 3:29:44 PM2/28/18
to TiddlyWiki
I will just add drop and import of files, and export of files for that matter, are determined with mime types. The application "tw" and browser need to coopperate, there is a suit of standards around this, in part for security.

Also in the past I used a Firefox plugin "copy as html" and pasted this into tw5. It often rendered well at least once you set the tiddler type to html. Editing after that not so friendly.

Regards
Tony

Reply all
Reply to author
Forward
0 new messages