EditorMagic - status update

232 views
Skip to first unread message

Mat

unread,
Jul 3, 2020, 5:59:22 AM7/3/20
to TiddlyWiki
Re-demo of EditorMagic ~ the editor as an assistant!

With critical help from, particularly, @Jed, @Saq and @Eric (THANK YOU GUYS!!!) things are now decent enough for a new demo attempt.

The idea is that you type e.g <$ to trigger a popup with a picklist for widgets. Or type ??dr to pop up a drawing canvas and get a transclusion to the image in your current tiddler. I.e the popup content depends on what you typed to trigger it. (Hover the ⓘ for trigger information.) And make your own custom triggers for popups showing whatever you want; pick lists, internet lookups e.g synonyms, wikipedia, image searches...

This is still only a proof of concept and does NOT work properly, as you'll note after a little testing: 

EditorMagic  ~  to make the editor actively assist your writing and coding!

But guys, your brains are needed to make this pass beyond proof-of-concept. If you see the potential in it and have insights, then please help out. I'll be happy to explain how it is constructed but there's nothing holy about the current particular implementation.

<:-)

TW Tones

unread,
Jul 3, 2020, 8:37:20 AM7/3/20
to TiddlyWiki
Mat

Looks great. Just tried it on mobile.

Now I need to think through how this can turbo charge various activities and workflows.

I see the value in links a n d relationships. Have you given some thought to coding support like writing complex wiki text macros and widgets?

a long sought after feature. Thanks Mat[e].

TW tones

Felicia Crow

unread,
Jul 3, 2020, 9:22:54 AM7/3/20
to TiddlyWiki
Hi Mat,
it looks really great so far, I especially like the idea of the scribble area even if it does not fully work within the popup right now.

One thing I could think of for a future version - if it isn't beyond the limits of tiddlywiki itself - would be to navigate between the suggestions with the keyboard.
Unless that is already a thing and I am just missing something, than sorry for mentioning it.

Regards,
Felicia

Mat

unread,
Jul 3, 2020, 9:36:27 AM7/3/20
to TiddlyWiki

Looks great. Just tried it on mobile.

Thanks for trying it out. I didn't even try it on mobile so no idea how it performs there. 
 

I see the value in links a n d relationships. Have you given some thought to coding support like writing complex wiki text macros and widgets?

Not sure what you mean. It does support invoking macros and widgets (even if we'd need some mechanism to collect all macro titles) and there is support for stamping, e.g like is done in the HTMLtable example (test it by typing <table ). One could stamp a "skeleton" for e.g a macro but it really isn't practical because you'd have to exchange every parameter anyway, leaving only the \define and \end. As for widgets, it could stamp some JS skeleton I guess but I don't know what that would encompass.

BUT, regardless, the idea is that the user can easily make his own popup content! The key feature is really to enable a popup at caret position that can show any content based on what you just typed in the editor. I added several examples that are "estimations" of what people will want, mostly to demo the concept, but the hope is that once it's a plugin, the community will come up with useful tools and other popup content.

<:-)

Mat

unread,
Jul 3, 2020, 9:38:11 AM7/3/20
to TiddlyWiki
Felicia Crow wrote:
[...] navigate between the suggestions with the keyboard.

In deed. 

So, some important next steps are:
  • get the CaretPosition plugin to behave properly - @Jed has done a good job so far but there are several glitches
  • get the main mechanism logic to handle the different types of triggers correctly. For example <$ should list all widgets but [[ should not list all tiddlers (because there are too many) and I'm not clear how to handle trigger-ends (e.g /> , </$, >>, ]] etc properly, including tools that don't have such closers e.g ??dr (the canvas tansclusion) etc
  • Need mechanism to dismiss a popup... but it needs to be active again automatically if called for again. 
  • Need way to inform what trigger the popup refers to. Editing a tiddler full of code can open a popup but the popup is at caret position so it is not clear exactly where the popup is triggered /refers to.
  • Keyboard navigation
 <:-)

TiddlyTweeter

unread,
Jul 6, 2020, 3:11:29 AM7/6/20
to TiddlyWiki
Mat wrote:
Re-demo of EditorMagic ~ the editor as an assistant!

With critical help from, particularly, @Jed, @Saq and @Eric (THANK YOU GUYS!!!) things are now decent enough for a new demo attempt.

 Ciao Mat

Quick comment. Looking v. good! Hope you will get help on the remaining issues, which are beyond me.

What I like about it A LOT is that it shows a way one tool can be used to address common editing needs in a simple, efficient way.
Very appealing. Extensible.

I'd use it!

Best wishes
TT

TW Tones

unread,
Jul 6, 2020, 4:46:10 AM7/6/20
to TiddlyWiki
Mat,

Not sure what you mean. It does support invoking macros and widgets (even if we'd need some mechanism to collect all macro titles) and there is support for stamping, e.g like is done in the HTMLtable example (test it by typing <table ). One could stamp a "skeleton" for e.g a macro but it really isn't practical because you'd have to exchange every parameter anyway, leaving only the \define and \end. As for widgets, it could stamp some JS skeleton I guess but I don't know what that would encompass.

I was just wondering if you had considered it?, not extending features, just as is, you next paragraph describes what I was thinking. 
 

BUT, regardless, the idea is that the user can easily make his own popup content! The key feature is really to enable a popup at caret position that can show any content based on what you just typed in the editor. I added several examples that are "estimations" of what people will want, mostly to demo the concept, but the hope is that once it's a plugin, the community will come up with useful tools and other popup content.


I like this design approach.

Great Stuff
TW Tones

TW Tones

unread,
Jul 6, 2020, 8:27:48 PM7/6/20
to TiddlyWiki
Mat,

I was just reviewing your EditorMagic again and see how it can look up the documentation on widgets, what a fantastic feature.

When it comes to EditorMagic insertions;
  • I can see that there is a bit of work to be done to populate it with useful insertions, kind of a sample and generalised syntax's for each widget. 
I raise this because I would like to help, and wonder if they would be better as separate tiddlers or an interface to read and edit them were available to simplify.

However I now realise there may be an opportunity here.
  • Lets call this the "syntax library" for tiddlywiki widgets and macros
  • I have long desired Tiddlywiki.com to have more generic full syntax examples I can copy to clipboard and use, a single syntax, you delete the parameters you don't need, or a few different ones when they are substantially different forms.
  • If we can agree on a standard that works with editor magic and on tiddlywiki.com the community could build them for the community. Then the latest up to date general syntax could be accessed from a plugin and feed into other solutions including learning editions of tiddlywiki and Editor Magic.
  • I have always maintained there are opportunities to do things so they are benefit driven and reduce the effort of individuals buy building a collective repository on information or in this case syntax statements.
  • Ideally such solution will stop anyone facing an uphill battle to keep across the various syntax options and share the load.
Practical approach

If we had an easy way to generate standalone syntax tiddlers that could be submitted for addition to tiddlywiki.com by anyone, and a method on the widget documentation to list any such syntax tiddlers inside the documentation tiddler (perhaps a tag or equivalent field. This method allow more rapid inclusion in to tiddlywiki.com with less oversight needed. A simple export to json for all syntax widgets would allow you or anyone else to harvest the syntax's.

Even if you want a more compressed list you should be able to programaticaly generate you syntax table for this community developed resource.

Perhaps later an even larger library of tiddler containing code patterns can be developed in a similar way such as recursive macro example, preview thumbnails of tiddlers etc...

What are your thoughts?

Regards
TW Tones

Mat

unread,
Jul 7, 2020, 2:21:20 PM7/7/20
to TiddlyWiki
TW Tones wrote:
I was just reviewing your EditorMagic again and see how it can look up the documentation on widgets, what a fantastic feature.

In deed! I think once people get the power of a (well working) EditorMagic, they'll wonder how they survived before it.
 
When it comes to EditorMagic insertions;
  • I can see that there is a bit of work to be done to populate it with useful insertions, kind of a sample and generalised syntax's for each widget. 
I raise this because I would like to help, and wonder if they would be better as separate tiddlers or an interface to read and edit them were available to simplify.

Since you started by commenting on the widget docs tool, I'm guessing you're referrign to the widget picker tool that inserts the widget and its various parameters, and which currently fetches that data from a dictionary tiddler. Yes, I appreciate all the help I can get - thank you! - and, yeah, maybe it's better to have each "widget info" in a separate tiddler, I don't know. As you probably note, I've only sloppily filled in the parameter list for a few of them because it turns out to be... quite a lot of work.

  • Lets call this the "syntax library" for tiddlywiki widgets and macros
Sure! 
  • I have long desired Tiddlywiki.com to have more generic full syntax examples I can copy to clipboard and use, a single syntax, you delete the parameters you don't need, or a few different ones when they are substantially different forms.
Yes but for some I feel there are so many parameters that it might be more work to erase them than to type in the few you need (e.g the ButtonWidget - mama mia!) 
  • If we can agree on a standard that works with editor magic and on tiddlywiki.com the community could build them for the community. Then the latest up to date general syntax could be accessed from a plugin and feed into other solutions including learning editions of tiddlywiki and Editor Magic.
A main idea with EditorMagic is that people can fill the popup with whatever they want, so the "standard" you refer to would rather be one that works with the/a widget picker tool :-) The current implementation for the widget picker is just a proposal, mostly to demo what EditorMagic can be used for.


Practical approach

If we had an easy way to generate standalone syntax tiddlers that could be submitted for addition to tiddlywiki.com by anyone, and a method on the widget documentation to list any such syntax tiddlers inside the documentation tiddler (perhaps a tag or equivalent field. This method allow more rapid inclusion in to tiddlywiki.com with less oversight needed. A simple export to json for all syntax widgets would allow you or anyone else to harvest the syntax's.

I'm not sure I follow fully but it did strike me that it would be neat if the tiddlywiki.com docs had a defined format for e.g the parameters of widgets or other stuff, so one could automate this. A kind of docs api. E.g so one could fetch data by means of e.g a filter ( [fetch:fields[ButtonWidget]] ). I wouldn't hold my breath for this though ;-)

I did experiment and discuss a few ways to generate the widgets list because it is a shame to hard code this. It is currently generated based on the widgets found in the core code but there are inconsistencies.

A major thing for working with tiddlywiki.com is of course that any changes to that place is up to Jeremy.

<:-)

Reply all
Reply to author
Forward
0 new messages