Codemirror Theme and Autocomplete query

91 views
Skip to first unread message

Reet Pandher

unread,
Jun 3, 2020, 12:56:58 PM6/3/20
to TiddlyWiki
Regarding theme:

I am unable to change the theme of the codemirror editor box in TW. I followed the instructions given in $:/plugins/tiddlywiki/codemirror/usage but no luck! It sticks to it's default theme.
Themes i tried: blackboard-black and blackboard.css

Regarding Autocomplete:
I used Saq's solution for autocomplete and it works great but there is one small issue with it: It requires you know the exact initial letter of the tiddler title or else it won't show the correct tiddler! Is there any other modification available that'll make work more like edit-comptext plugin. I would use edit-comptext but sadly these two don't work together!

Any help will be appreciated

TonyM

unread,
Jun 3, 2020, 9:40:41 PM6/3/20
to TiddlyWiki
Reet,

Remember there is also the editor toolbar button, the link icon, which allows you to search for titles, and insert them as a link. Autocomplete is about completing what you type, its when tiddlywiki knows what you want. 

It should not be too hard to make a link editor toolbar for system tiddlers as well, or with filters so you can refine the search, perhaps even to tiddlers with specific content.

Regards
Tony

Reet Pandher

unread,
Jun 3, 2020, 11:10:24 PM6/3/20
to TiddlyWiki
sweeeet.. this solves my remaining autocomplete woes!!
thanks tonym

Steven X

unread,
Jun 3, 2020, 11:11:46 PM6/3/20
to TiddlyWiki
I would try using TW's search function instead, by replacing

return {
    list: (!curWord ? [] : tiddlers.filter(function(item) {
        return item.match(regex);
    })).sort(),

with

return {
  list: $tw.wiki.filterTiddlers(`[all[tiddlers]search:title:literal[${curWord}]!prefix[$:/state]]`),

Steven

Reet Pandher

unread,
Jun 3, 2020, 11:13:09 PM6/3/20
to TiddlyWiki
So found the issue with the theme.
I had to change ThemeName.css to ThemeName in tiddler title and the name field and it worked !!
Such a silly thing caused so much trouble.
Reply all
Reply to author
Forward
0 new messages