Hi Albert,

.. That's brilliant :)

... but I'd change the default button texts. The button has to show 
"autosuggest off" that the plugin works. ... and it would be nice, if the 
command could save it's state to the tiddler, which is kind of tricky ... 

I did something similar for the codemirror editor plugin, to save the F11 
"full size mode". The save custom field code is part of ExtraKeysAddOn [1]. 
So  you'd need the 


Story.prototype.hasTiddlerField = function(title,field) function.


and this "save value part" from the toggleMaxHeight function 

            var f = story.hasTiddlerField(title,'cm.height'); 
            if (!f ) {
                story.addCustomFields(tidEl, 'cm.height:'+cmHeight);
            }
            else {
                f.setAttribute('value', cmHeight);      
            }
            ed.refresh();


so you'd neeed to replace "cm.height" with your auto suggest status. .... 


Reading the code could be in your command

    // doesn't set tid if title is a shadow tiddler
    var tid = store.getTiddler(title);   // title is defined as a handler() 
param. 


    if (tid.fields['cm.height']) { ... do stuff


have fun!
mario

[1] http://codemirror.tiddlyspace.com/#ExtraKeysAddOn

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to