1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 11:29:58 +00:00
TiddlyWiki5/core/ui/EditTemplate/body.tid
Jermolene 06a0d21734 Use double linebreaks to indicate content of a widget or html element should be parsed in block mode
Fixes #82.

The old behaviour was to parse the content of a widget or html element
in block mode if the opening tag was followed by a line break. The new
behaviour requires two line breaks.

This makes it possible to include linebreaks more liberally within
wikitext, although care must still be taken to only use double line
breaks when the block mode behaviour is desired.

The code change here is very simple, just a single line change in
html.js. Most of the other changes are to convert various single line
breaks into double line breaks.
2014-02-20 21:42:31 +00:00

31 lines
924 B
Plaintext

title: $:/core/ui/EditTemplate/body
tags: $:/tags/EditTemplate
\define lingo-base() $:/language/EditTemplate/
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
<em class="tw-edit"><<lingo Body/Hint>></em> <$button type="set" set="$:/ShowEditPreview" setTo="no"><<lingo Body/Preview/Button/Hide>></$button>
<div class="tw-tiddler-preview">
<div class="tw-tiddler-preview-preview">
<$transclude />
</div>
<div class="tw-tiddler-preview-edit">
<$edit field="text" class="tw-edit-texteditor" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>
</div>
</div>
</$reveal>
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
<em class="tw-edit"><<lingo Body/Hint>></em> <$button type="set" set="$:/ShowEditPreview" setTo="yes"><<lingo Body/Preview/Button/Show>></$button>
<$edit field="text" class="tw-edit-texteditor" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>
</$reveal>