Jed - very informative. Big thank you! ... DOM, which in tiddlywiki can be refreshed and recreated at any time. > [...] This makes having the state saved manually by the user a bad solution > because it may seemingly randomly lose work. >
And to have the state saved by/in the very last action in the drop action? Because it at least very unlikely that DOM is refreshed *during *the DnD... right? > Most of the rest of the problem comes from how tiddlywiki has to know what > you are trying to move, and what is a valid location for dropping it. If > you can pick up individual words than how do you tell tiddlywiki you want > to pick up the whole paragraph? > My point with bringing up "words" was merely to clarify that everything has an intrinsic position in a text, not to actually be able to drag individual words. Rather it is blocks, possibly delimited by <div> tags, which should be drag'n droppable in relation to other such <div> tags. My point in exemplifying such blocks with <div> tags, specifically, is that *divs are manipulable in html*. E.g we can CSS a div to light up when hovering over it. ...so isn't JS also able to target and manipulate individual <div>s? ...and it could use the exact *same rules as when nesting html* - be it in transclusions, in nested divs or whatever. So that if you click anything (any word) in a div, then the whole div should be selected. ...and if divs are nested, then clicking outside the inner div targets the outer div. Like with ad-blockers - you hover over html elements and have them light up. If you hover outside of the element, then instead the next level lights up which includes also the inner one. I think that is the only reasonable way to select elements that are nested. [...] 'drag any paragraph' ... you are going to have to lose some > formatting and transclusions will break it because you are going from raw > next -> wikitext -> html and then back from html->raw text. I am sure that > is possible but I doubt it is easy to do in a way that preserves the > specific markup in what you originally wrote. > Do you mean like how dragging //away <div>this</div> would// loose the italics? That's a fair price to pay I would say. Moving out a block from inside a transcluded text to outside of it... I'm unsure how a transclusion actually functions but I guess that would either "work" or be a forbidden move (kinda like trying to move something out of an iframe). Unless I am completely misunderstanding what you are asking for. If you > want something like a button but you click and drag an item from one place > and drop it in another and the resulting action is based on which starting > and ending point is used than that is a different problem. > Specifically in TidBitz, the only application for the discussed DnD concept is to rearrange literal macro calls within a tiddlers text field. A luxury version would be to be able to move it between different tiddlers. (And it is assumed that the droplocation is onto another such drag'ndroppable area (i.e another macro call). BUT, and this is very important I think, it wouldn't let you rearrange text > any differently than you can rearrange plain text using existing wikitext > widgets. > Not quite sure what you mean here. But I believe it would be possible to make some contrived solution where a listwidget takes a tiddlers text field and searches up a specific segment in the text and then re-builds the text with that segment moved. Is that what you mean a js widget would do also? <:-) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/17f93ff1-367b-4035-8901-381f39f20332%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

