Edit-text widget question

70 views
Skip to first unread message

History Buff

unread,
Jan 13, 2021, 4:32:31 PM1/13/21
to TiddlyWiki
Hello all,

I'm in the process of implementing a few edit-text widgets to ease the editing of fields. In the process, I noticed that the size of the textarea box is affected by the $:/config/TextEditor/EditorHeight/Mode tiddler and the $:/config/TextEditor/EditorHeight/Height tiddler which I had previously set as fixed for editing relatively large tiddlers to keep the edit bar visible. 

Is there a way that I can have separate settings for my individual edit-text widgets and my the normal editing of tiddlers? I'm asking this because, at present, the text box for my edit-text widgets are unreasonably large unless I set the mode to auto.

Thanks in advance!

Mark S.

unread,
Jan 13, 2021, 7:09:20 PM1/13/21
to TiddlyWiki
You might show an example of what you're doing.

If you're doing what I think you're doing, then you'll probably need to wrap a div with a custom class around your edit boxes, and then create a stylesheet that uses !important to override the setting. The setting gets placed via a style attribute, and AFAIK the only way to override that is with an !important style.

History Buff

unread,
Jan 13, 2021, 7:19:15 PM1/13/21
to TiddlyWiki
Here's the simple code that I'm using in a separate tiddler that I transclude into a different tiddler. When the editor height mode is set to fixed the edit-text "window" is whatever is set in the editorheight tiddler which is huge.

Notes:
  <$edit-text
    tiddler=<<currentTiddler>>
    field=notes
    class=fieldarea
    tag=textarea
/>

Mark S.

unread,
Jan 13, 2021, 8:27:11 PM1/13/21
to TiddlyWiki
If you make a stylesheet tiddler (a tiddler tagged $:/tags/Stylesheet) and put in this content:

textarea.fieldarea {
height: 5em !important  ;
}

You can override the default height that is being used. 



History Buff

unread,
Jan 14, 2021, 11:57:45 AM1/14/21
to TiddlyWiki
Thanks Mark,

That worked just fine. I had tried that before, but didn't think to add the "!important" part of that.

Reply all
Reply to author
Forward
0 new messages