Pesenting: the DragTools concept

578 views
Skip to first unread message

Mat

unread,
Feb 9, 2017, 8:17:47 AM2/9/17
to TiddlyWiki
The TWaddler proudly presents...

...his fastest creation ever, thrown together over the lunch break...

...it works pretty well but the main point is as a proof-of-concept...

DragTools - (can be) a palette of whateveryouwant to drag'n drop into the editor

I've wanted a much more visual interface for making TW stuff for a long time. The new editor toolbar is a step in the right direction but I think we've scratched the surface. DragTools is another step. In the end we ought to have a UI that lets most TW use be achieved by visual manipulation rather than scary curly brackets etc.


<:-)

Andreas Hahn

unread,
Feb 9, 2017, 12:12:29 PM2/9/17
to tiddl...@googlegroups.com

Hello Mat,

that is a cool idea, I do like it... there is however another possibility to do this that you might not be aware of:

You can very easily add your own editor buttons in the editor toolbar. Just create a tiddler, tag it with $:/tags/EditorToolbar and include the following fields:

  • condition: filter-like expression to determine if the button should be shown in the editor .. for normal tiddlers, this should be set to [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
  • icon: if you want an icon
  • caption: if you want a textual caption next to the icon
  • description: to add a tooltip

Furthermore the following widget-message will insert text at the current selection, put this as the complete content for the tiddler:

<$action-sendmessage
	$message="tm-edit-text-operation"
	$param="replace-selection"
	text="Hello Mat!"
/>

There is more documentation here: http://tiddlywiki.com/#WidgetMessage%3A%20tm-edit-text-operation:%24%3A%2Fcore%2Fui%2FEditorToolbar%2Fheading-2%20%5B%5BWidgetMessage%3A%20tm-edit-text-operation%5D%5D

I am not completely sure if this fits your vison for the DragTools concept, but I hope this was useful to you, keep coming up with cool ideas!

/Andreas

David Szego

unread,
Feb 9, 2017, 9:02:20 PM2/9/17
to TiddlyWiki
Can someone please add Andreas's very specific, but precise and amazingly useful description below, to the core TW distribution in a Tiddler called "Adding Editor Buttons"?

Mat

unread,
Feb 10, 2017, 2:33:49 PM2/10/17
to TiddlyWiki
Andreas, thanks for informative reply!

Yes, in deed one can make ones own editor buttons - even if I have not yet attempted to do so, so really thanks for the write-up. I agree with David that this should definitely go into the Docs - would you mind making a pull request?

A thing I like with the presented idea is that of drag'n dropping stuff. I have some vague ideas where this method is useful but the editor toolbar is not, or at least I don't think so. I'll report if I make something with it.

<:-)
Reply all
Reply to author
Forward
0 new messages