Rich Text Editor Field

169 views
Skip to first unread message

Darth Mole

unread,
Jun 17, 2021, 10:47:35 PM6/17/21
to TiddlyWiki
Hello!

I just want to confirm what I think I found in my search, which is:

That there isn't a way to display the below form field as a rich text editor input field?

|<$edit-text tiddler=<<temp>> field="test" tag=textarea rows=10 /> |

Thanks!

TW Tones

unread,
Jun 20, 2021, 9:18:54 PM6/20/21
to TiddlyWiki
iamdar,

You can create multi-line fields but if you edit them in the field editor of edit mode, they will loose the line breaks. You can make your own edit template, editor for such fields, and hide them from the default field editor. 

However there is a leap to rich text editor. What do you mean?

Search for WYSIWYG will be informative. I think the CKEditor (requires some local install) has a  WYSIWYG editor that saves in HTML.

tones

Darth Mole

unread,
Jun 20, 2021, 10:24:31 PM6/20/21
to TiddlyWiki
Thank you very much for your reply! I'll take a look at what you suggested. Basically I was trying to replicate the "edit tiddler text/body field" where you write the main tiddler details. I was hoping to have multiple ones of those in the form so that someone could submit formatted text from the beginning.

Thanks!

Darth Mole

unread,
Jun 21, 2021, 1:51:04 PM6/21/21
to TiddlyWiki
Annnnnnd I'm a complete and utter idiot!

I said rich text editor and I didn't mean rich text editor >.< Furthermore, after reading a different thread I realized that the functionality I'm looking for isn't even a type of field, but rather the buttons above the field.

I've been trying to dissect the EditTemplate but can't seem to find the right combination to get the formatting shortcut buttons to appear above the textarea field. 

If, instead of "rich text editor" like a moron, I ask "how do I include the button shortcuts on a text area field inside of a tiddler?" does that make things easier/more sense?

Thank you!

Saq Imtiaz

unread,
Jun 21, 2021, 2:09:43 PM6/21/21
to TiddlyWiki
{{|| $:/core/ui/EditTemplate/body/editor}}

Saq Imtiaz

unread,
Jun 21, 2021, 2:10:34 PM6/21/21
to TiddlyWiki
To customize for your needs look at  $:/core/ui/EditTemplate/body/editor tiddler to see how it transcludes the toolbar buttons.

Darth Mole

unread,
Jun 21, 2021, 3:52:59 PM6/21/21
to TiddlyWiki
Thank you very much!!

It is working, and I think it is working correctly. I don't see anything that shouldn't be created created, though if possible can someone please review the below code to make sure I'm not beating on a hornets nest? Thanks!

!Demographics
<$edit
  tiddler=<<temp>>
  tag="textarea"
  field="settlementdemographics"
  class="tc-edit-texteditor tc-edit-texteditor-body"
  placeholder={{$:/language/EditTemplate/Body/Placeholder}}
  tabindex={{$:/config/EditTabIndex}}
  focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}}
  cancelPopups="yes"

><$list

  filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]"

><$reveal

  type="nomatch"
  state=<<config-visibility-title>>
  text="hide"
  class="tc-text-editor-toolbar-item-wrapper"

><$transclude

  tiddler="$:/core/ui/EditTemplate/body/toolbar/button"
  mode="inline"

/></$reveal></$list></$edit>

Reply all
Reply to author
Forward
0 new messages