Announcing Editor-Autolist-Markdown

266 views
Skip to first unread message

Jason Houle

unread,
Jul 15, 2021, 1:13:15 PM7/15/21
to TiddlyWiki
Hi all, I have been learning about TW5 and making increasing use of it over the past ~9 months. It is an incredible tool with a great ecosystem of support, so as I begin to make some customizations I wanted to share these back for the community.

I have put together a plugin based on Saq's excellent editor-autolist. I primarily use markdown for my notes so I have adapted it for markdown lists.

I have used bullet lists pretty extensively in the MS ecosystem in my work, so in addition to the list indent and continuation, I added features to indent/unindent multiple lines, and to move list sections up or down.

Please check out the GH repo and the hosted plugin. This is the initial release so I welcome your feedback and suggestions for improvement!

Saq Imtiaz

unread,
Jul 15, 2021, 1:33:01 PM7/15/21
to TiddlyWiki
Hi Jason,

That looks fantastic. The original autolist was a plugin hacked up in about an hour in response to a reddit request. It was never really meant for wider adoption. I worked on support for multiple lines later in response to a request here on the group but I don't think I ever published that.

I think a good next step if you are up to it, would be to make it configurable to detect whether it is a markdown tiddler or wikitext tiddler, and be able to support both. That I thing would add a lot of value to the community but I do understand that it may not be a priority for you if your primary use case is markdown tiddlers.
Cheers,

Saq

Mat

unread,
Jul 15, 2021, 7:18:06 PM7/15/21
to TiddlyWiki
Yes! I can only agree with Saq; that is super cool and I hope you or someone could make it available for vanilla TW!
Thanks for sharing!

<:-)

TW Tones

unread,
Jul 15, 2021, 7:29:12 PM7/15/21
to TiddlyWiki
jason,

Nice work, thanks for sharing, yes wiki text please. Or Saq's  editor-autolist   gaining these features would be the wiki-text version (looks like a collaboration opportunity!)

Building a bullets to streams, and stream to bullets model would also be powerful.

Tones

David Gifford

unread,
Jul 17, 2021, 2:31:52 PM7/17/21
to TiddlyWiki
Added this to the Toolmap!

Daryl Sun

unread,
Jul 22, 2021, 11:47:37 PM7/22/21
to TiddlyWiki
Hello!

Thank you very much for this plugin. I use Markdown for note-taking, and it's always driven me crazy that I have to manually set indentation for my bullet-lists, since I can't use Editor-Autolist. So I'm very pleased to see that a Markdown version now exists.

However, I've found a bug where the plugin stops working if the editor toolbar is hidden. I discovered this because I use Big Text Area from Stroll, and I couldn't get Editor-Autolist-Markdown to work. I managed to replicate the bug in an empty TiddlyWiki file with only the official Markdown plugin +  Editor-Autolist-Markdown, and everything else default, but the editor toolbar is disabled. I tested this in Firefox on Windows 10.

I understand if this is a very unusual use case and it's not a high priority to fix it. I have a knack for finding strange bugs.

Jason Houle

unread,
Jul 23, 2021, 4:18:12 PM7/23/21
to TiddlyWiki
@Daryl, glad to hear you enjoy it! Also, I came to TW5 by way of Stroll, so kudos are due to David as well.

I was actually unaware of this Stroll feature until you pointed it out. Unfortunately I think that is where the issue lies: the way Stroll has implemented the 'remove toolbar' actually takes away the functionality as well as the visibility of the buttons. (Try for example ctrl-B or ctrl-I, with and without the toolbar visible. This is true whether you use markdown, vanilla wikitext, or anything.) Inheriting from Saq's implementation (and I'm not sure if there's any other way to do it), editor-autolist-markdown works via an 'invisible' toolbar button with the assigned key shortcuts. So when the toolbar is removed, even though there wasn't a visible button to begin with, the autolist functionality goes away just like it does for bold, italic, etc.

This could be addressed by how the Big Text Area is implemented. I'm sure it is more difficult to implement, but it is possible to turn the toolbar invisible rather than removing it via <$reveal>. If the style "display: none" is added to the div containing the toolbar (I think by default it is .tc-text-editor-toolbar-item-wrapper) this would do it. (This would also bring back your bold, italic, etc.)

Daryl Sun

unread,
Jul 23, 2021, 10:42:19 PM7/23/21
to TiddlyWiki
Thank you for your reply!

I didn't know the toolbar was actually responsible for most of the functionality of Editor-Autolist, and by extension Editor-Autolist-Markdown. I never used it, and I don't use keyboard shortcuts for formatting since I format by hand - unless it's indentation, in which I curse myself out for automatically hitting Tab to indent a bullet and forget it doesn't work in TiddlyWiki without Editor-Autolist.

Also, I apologize for my mistake: Big Text Area isn't a built-in feature, but an add-on to Stroll under Goodies. It's not included in Stroll by default, which is probably why you weren't aware of it. I myself only came across while looking through David Gifford's TiddlyWiki Toolmap.

Furthermore, I forgot to add that I'm fairly new to TiddlyWiki: I've tinkered with settings and plugins, and I'm familiar with HTML and CSS, but that's it. I confess I'm no coder and have no idea how TiddlyWiki works under the hood. However, I'll try your suggestions and report back my findings.

Again, thanks for the help!

Saq Imtiaz

unread,
Jul 24, 2021, 3:56:21 AM7/24/21
to TiddlyWiki
Inheriting from Saq's implementation (and I'm not sure if there's any other way to do it), editor-autolist-markdown works via an 'invisible' toolbar button with the assigned key shortcuts.

The alternative would be trying to add event listeners for the keydown event to the text area via JavaScript. I think the toolbar button approach is a lot more flexible.
 
This could be addressed by how the Big Text Area is implemented. I'm sure it is more difficult to implement, but it is possible to turn the toolbar invisible rather than removing it via <$reveal>. If the style "display: none" is added to the div containing the toolbar (I think by default it is .tc-text-editor-toolbar-item-wrapper) this would do it. (This would also bring back your bold, italic, etc.)

This is precisely how Streams hides the toolbar. All toolbar buttons that don't display a popup continue to work via keyboard shortcuts. 
Reply all
Reply to author
Forward
0 new messages