Hi
With respect to the last code posted here [1], you simply have to
change...
store.getTiddlerText(t.title)+'\n'+txt,
...to...
txt,
...which sets the tiddler's content to what was retrieved as a
template via...
txt=store.getTiddlerText('NEWTEXT')||'';
Cheers, Tobias.
[1]
Hi Tobias
With respect to the last code posted here [1], you simply have to
change... store.getTiddlerText(t.title)+'\n'+txt, ...to... txt,
Great - Thank you :-)
Now I'll need to specify autosave to make all touched tiddlers save on
a TiddlySpace, unless I want to open every tiddler and click
Hi Tobias
Thanks a lot!
Thats real magic or maybe more rightly put: JS-poetry :-)
I had a syntaxerror - unknown sth if When I replace the comma after
tpl=store.getTiddlerText(tpl)||'', with a ; it seems to work, with
the prompts, however saving still doesn't occur?!
Saving of all edited tiddlers
Hi again Måns,
Turns out - since you're actually not creating any new tiddlers - you
don't need to merge config.defaultCustomFields with any existing
fields.
I have modified the script in your sandbox for the tagging rule which
you desired and tested...
script label=Replace Text Now!
var i,t,
Hi Tobias
How do i make this script actually *replace* text (and *not* fields)
For now I'm using it to add text - which is fine - however I have made
a lot of entries that I would like to replace, either with a blank
textarea or with a new modified template.
I tried to remove the +txt bit after
Hi Måns,
Forgot about this thread. When you say replace text do you mean
replace a placeholder like %somePlaceholder% with some content or do
you mean take a section and replace it's content or do you mean take
any (multiline?) text and replace it with some other. What exactly is
the workflow or
Hi Tobias
Forgot about this thread. When you say replace text do you mean
replace a placeholder like %somePlaceholder% with some content or do
you mean take a section and replace it's content or do you mean take
any (multiline?) text and replace it with some other. What exactly is
the
Hi Tobias
Super!!
Sorry for any inconvenience.
No apologies needed!! - On the contrary, I'm very happy about the fact
that you took the time needed to produce a workable script.
There *should* be some crashtesting before releasing a plugin to the
world - however: I asked for a workable script,-
Hi Mans,
To replace the text of certain tiddlers with multiline content, you
could use the following InlineScript...
script label=Replace Text Now!
var t,
tids=store.getTaggedTiddlers('UPDATE'),
txt=store.getTiddlerText('NEWTEXT')||'';
if(!confirm(Really replace the contents of:\n+
You could also append text, instead of merely overwriting it by
changing...
store.saveTiddler(tids[t].title,tids[t].title,txt);
to...
store.saveTiddler(tids[t].title,tids[t].title,
store.getTiddlerText(tids[t].title)+'\n'+txt);
Tobias.
--
You received this message because you are subscribed
Hi Tobias
This is great and effective code!! - but also *very* dangerous :-)
It deletes any tag or custom field in tiddlers!
I need those to stay unaffected.
Is it possible to narrow the replacement down *only* to affect the
textfield, leaving all other fields as they are??
That would be
Hi again, Måns,
Mhhh... are you sure? I have just tested this on Firefox 3.6.4 and a
TW 2.5.0 ...and tags, fields even modified remained untouched! On the
other hand, modifier and modified really should change, shouldn't
they?
Tobias.
--
You received this message because you are subscribed to
Hi Tobias
Mhhh... are you sure? I have just tested this on Firefox 3.6.4 and a
TW 2.5.0 ...and tags, fields even modified remained untouched!
I have to use Google Chrome (ver 5.0.375.127) as ImagePath plugin
doesn't seem to work in FireFox anymore (not since 2.53 anyway) - and
images are
Hi Mans,
Sorry for any inconvenience, here's the updates script that should
avoid the troubles you'Ve had...
script label=Replace Text Now!
var t,i,
tids=store.getTaggedTiddlers('UPDATE'),
txt=store.getTiddlerText('NEWTEXT')||'';
if(!confirm(Really replace the contents of:\n+
Hi Mans,
Sorry for any inconvenience. Here's the update to the script to batch-
update the text of certain tagged tiddlers to that of some
template ...now hopefully avoiding any of the troubles you've had:
script label=Replace Text Now!
var t,i,
tids=store.getTaggedTiddlers('UPDATE'),
Hi Eric
I've made a some significant code changes in the internals of
EditSectionPlugin, so that it correctly handles *creating a new
section*, as well more robust handling for *renaming* a section (it no
longer leaves the old section behind).
Also, the EditSection popup editor now includes
Hi again
Can anyone explain how to paste multiline text into a lot of tiddlers
at once (it doesn't matter if it overwrites existing text)?
Regards Måns Mårtensson
On 30 Aug., 11:23, Måns humam...@gmail.com wrote:
Hi TwWizards (Eric in particular)
I'm trying to setup EditSectionsPlugin macros
17 matches
Mail list logo