Make editor plugins work for <$edit-text> widgets

98 views
Skip to first unread message

Stobot

unread,
Dec 2, 2020, 1:44:41 PM12/2/20
to TiddlyWiki

Hi Folks,

There are some amazing plugins I can't live without for the editor experience - 2 quick ones would be:
1. Editor-autolist from Saq
2. Edit-comptext from Snowgoon88

Concurrently I'm experimenting with some setups where I end up editing via an edit-text widget rather than the normal edittemplate. Is there a way I can setup the edit-text widget to trick the plugins to function like it's a full tiddler in edit-mode?
I hope that makes sense... Thanks!

Saq Imtiaz

unread,
Dec 2, 2020, 2:47:11 PM12/2/20
to TiddlyWiki
Editor-autolist depends on the editor toolbar - but you can hide it with css if you find it distracting.
Have a look at the contents of the <$edit> widget here which sets up the toolbar:
$:/core/ui/EditTemplate/body/editor 

Also, using <$edit> instead of <$edit-text> might get the autocomplete working as well. It's been a while since I looked at it though. If that does not work, use <$edit-comptext>.

Stobot

unread,
Dec 2, 2020, 3:13:26 PM12/2/20
to TiddlyWiki
Thanks!
Ok, for autocomplete the <$edit> worked where <$edit-text> didn't - perfect!
For your autolist, I got it to work, but you're right - hiding the toolbar would be excellent.

This is where I'm at that technically works - simplification of the $:/core/ui/EditTemplate/body/editor tiddler you suggested I reference

<$edit tiddler="$:/temp/testing">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]">
<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/>
</$list>
</$edit>

My best guess would be some magic "hide css" to put inside a class or style for the transclude widget or something? Sorry - totally lost there.

Thanks in advance again!

Stobot

unread,
Dec 2, 2020, 3:16:09 PM12/2/20
to TiddlyWiki
Ha, tried this and it made some change - but now all the buttons just overlap the input box...

<style>
.hideme {
height:0px
}
</style>


<$edit tiddler="$:/temp/testing">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]">
<div class="hideme"><$transclude style="height:0px" tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/></div>
</$list>
</$edit>

Saq Imtiaz

unread,
Dec 2, 2020, 3:33:20 PM12/2/20
to TiddlyWiki
Try this:

<style>
.my-editor .tc-editor-toolbar {
display:none;
}
</style>

<div class="my-editor">

<$edit tiddler="$:/temp/testing">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]">
<$transclude style="height:0px" tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/>
</$list>
</$edit>
</div>

Saq Imtiaz

unread,
Dec 2, 2020, 3:34:03 PM12/2/20
to TiddlyWiki
PS: drop the style declaration from the transclude widget as it wont work nor is needed.

Stobot

unread,
Dec 2, 2020, 3:40:45 PM12/2/20
to TiddlyWiki
Thanks!
Reply all
Reply to author
Forward
0 new messages