> > I am having some trouble understanding how to update the text and other > fields of a tiddler my widget editor works on. > > I am at the point where the editor is holding > (1) editor.widget, a ref to the widget it was called from and > (2) fieldUpdates, an object with field/value pairs for all the tiddler's > fields I want to update. My problem is which function to use to get the > task done. >
If you're editing a tiddler with your editor and you want its title, the widget calling your editor must have it (...) ? what does console.log(editor.widget) say? is there no editTitle? is your editor called the standard tw way using factory.js? > I tried/looked up the following approaches in my update function (located > in a loop in the external library that builds the editor object-) > > a. editor.widget.parseTreeNode[field]=fieldsUpdates[field] > Result: "Compiles" but no results, tiddler text and fields do not > change. > > b. editor.widget.wiki.setText(title, field, null, fieldUpdates[field]) > Didn't get to try it because it calls for the tiddler's title, And I > haven't find a method to get it from the widget > > c. editor.widget.wiki.setData(fieldUpdates) > Didn't try it it either, because the code comments say it would change > the tiddler's type to app/json, which is definitely not desired. > > What am I missing? > > Cheers, > > Stefano > > > -- > __________________________________________________ > Stefano Franchi > > [email protected] <javascript:> > http://stefano.cleinias.org > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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 https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/6d2ad5de-6123-4e71-ae11-0462d59cb5d1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
