multi-line edit-text area?

95 views
Skip to first unread message

MagoArcade

unread,
Jul 27, 2019, 5:58:49 AM7/27/19
to TiddlyWiki
Hi - read tw docs - no clues. I#m trying to display a mulit-line textbox in one of my tiddlers. Tried various attributes but only ever presented with a single line text field. How can I get a multi-line textbox and why don't the attributes work on edit-text?

Example permutation of an attempt:

<$edit-text tiddler="$:/_opTaskStore" field="description" tag="input" default="" class='tc-edit-texteditor' placeholder='Further details about the node here...' autoHeight="yes" rows="5"/>

single line text field. 

Also - I note that this can be achieved through css? However, there's no listing in the documentation about tw's inbuilt css classes to enable this?

Thanks

TonyM

unread,
Jul 27, 2019, 6:15:43 AM7/27/19
to TiddlyWiki
Try this tag instead tag=textarea

Remember you cant edit the current tiddler unless you play a few games.

One nice trick is from another tiddler you can do this;

<$tiddler tiddler="othertiddlername">
   
<h3>Office Notes</h3>
    <$transclude tiddler="$:/core/ui/EditTemplate/body/editor"/>
</$tiddler>
Or any other method to set the currentTiddler (while not in the current tiddler) eg in a tiddler tagged $:/tags/viewTemplate
Which looks like this

Snag_15a2045c.png


Regards
Tony

MagoArcade

unread,
Jul 27, 2019, 7:49:42 AM7/27/19
to TiddlyWiki
That's awesome thanks. It's almost like you read my mind! I wanted an editor in the 'front-end' of tiddlers rather than the 'back-end' (i.e. when you click edit. Your additional advice was going to be my next question! Got this implemented in my build now, so very happy. 

You don't also know how to transclude the tags widget do you? That is rather than have to click edit of a tiddler to access the tags function, have it directly on the front end of the widget.

Birthe C

unread,
Jul 27, 2019, 8:33:33 AM7/27/19
to TiddlyWiki
<$transclude tiddler="$:/core/ui/EditTemplate/tags"/>


Birthe

Mohammad

unread,
Jul 27, 2019, 10:04:16 AM7/27/19
to TiddlyWiki
Added to TW-Scripts

Mohammad

unread,
Jul 27, 2019, 10:15:52 AM7/27/19
to TiddlyWiki
Tony!
 I think it has a delay when you type !
What is the problem?
Have you tested this method?

--Mohammad


On Saturday, July 27, 2019 at 2:45:43 PM UTC+4:30, TonyM wrote:

Mohammad

unread,
Jul 27, 2019, 10:17:12 AM7/27/19
to TiddlyWiki
It also loses focus when the othertiddlername is created!


On Saturday, July 27, 2019 at 2:45:43 PM UTC+4:30, TonyM wrote:

Birthe C

unread,
Jul 27, 2019, 11:08:02 AM7/27/19
to TiddlyWiki
It works for me version 5.1.19. I have had problems before in some versions and remembered that at some point there was a change in tiddler $:/config/Drafts/TypingTimeout.
You could try to give a little more time.


Birthe

TonyM

unread,
Jul 27, 2019, 3:28:21 PM7/27/19
to TiddlyWiki
Mohammad

I use this method extencivly so yes it's tested. However I gave the answer to a specific question and there are conditions in which it has issues.

Perhaps its premature for tw scripts.

I intend to publish a robust solution but eveytime I go to publish for a general audience there are subtle issues that make it fragile or complex, I run down a rabit hole providing an additional layer of field definitions to address editing of every field type.

I have a number of robust solutions that do this well but they are within a greater solution and hard at this point to extract and generalise for a general audience.

I will publish in time.

Regards
Tony

Reply all
Reply to author
Forward
0 new messages