Skip to content

Commit

Permalink
Update 2.8.0
Browse files Browse the repository at this point in the history
This is a major update to tbpl-expand in dynamic table
  • Loading branch information
kookma committed Apr 2, 2023
1 parent fe43775 commit 13d18a3
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 24 deletions.
80 changes: 64 additions & 16 deletions docs/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packaged/shiraz.tid

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions source/shiraz/macros/dtables/tbl-expand.tid
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@ type: text/vnd.tiddlywiki
\define display-expanded-record()
<td colspan=<<ncols>> class="shiraz-dtable-expanded-record">
<$tiddler tiddler=<<currentRecord>> >
<$list filter="[<tempTableEdit>getindex[mode]match[edit]]" variable=ignore
emptyMessage="""<$transclude tiddler=<<currentRecord>> field=text mode=block/>""" >
<$edit-text class="tbl-inpt-edit" tiddler=<<currentRecord>> field="text" tag=textarea/>

<!-- in edit mode select between two editors: simple textbox or TW main editor e.g. codemirror -->
<$list filter="[<tempTableEdit>getindex[mode]match[edit]]" variable=ignore>
<$reveal type="nomatch" state="$:/config/shiraz/dynamictables/editor-type" text="main-editor" tag="div">
<$edit-text class="tbl-inpt-edit" tiddler=<<currentRecord>> field="text" tag=textarea/>
</$reveal>
<$reveal type="match" state="$:/config/shiraz/dynamictables/editor-type" text="main-editor" tag="div" class="shiraz-dtable-maineditor">
{{||$:/core/ui/EditTemplate/body}}
</$reveal>
</$list>

<!-- view mode -->
<$list filter="[<tempTableEdit>getindex[mode]match[view]]" variable=ignore>
{{||$:/core/ui/ViewTemplate/body}}
</$list>

</$tiddler>
</td>
\end
\end
2 changes: 1 addition & 1 deletion source/shiraz/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Shiraz",
"description": "extended markups, styles, images, tables, and macros",
"author": "Mohammad Rahmani",
"version": "2.7.7",
"version": "2.8.0",
"core-version": ">=5.2.2",
"source": "https://github.com/kookma/TW-Shiraz",
"list": "readme license history",
Expand Down
11 changes: 11 additions & 0 deletions source/shiraz/styles/dynamic-tables.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/* main editor toolbar settings for dynamic table */
.shiraz-dtable-maineditor .tc-editor-toolbar button svg{
height:0.9em; /* make toolbar buttons smaller */
width:0.9em
}
/* make third party plugins like KaTeX button smaller */
.shiraz-dtable-maineditor .tc-editor-toolbar button .katex{
font-size: 0.9em;
line-height:1em;
}

/* edit-text box for dynamic table */
.shiraz-dtable-textbox {
width:100%;
Expand Down
6 changes: 5 additions & 1 deletion source/shiraz/ui/ControlPanel/Settings.tid
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ tags: $:/tags/ControlPanel/SettingsTab $:/tags/MoreSideBar
title: $:/plugins/kookma/shiraz/ui/ControlPanel/Settings
type: text/vnd.tiddlywiki

\define dynamictables-editortype() $:/config/shiraz/dynamictables/editor-type

These settings let you customise the behaviour of Shiraz plugin.

---
Expand All @@ -20,4 +22,6 @@ These settings let you customise the behaviour of Shiraz plugin.
;Set dark and light palettes
{{$:/plugins/kookma/shiraz/ui/set-dark-light-palette}}


; Choose Local Editor for Dynamic Table
:<$checkbox tiddler=<<dynamictables-editortype>> field="text" checked="main-editor" unchecked="simple-textarea" default="simple-textarea"> Use Tiddlywiki main editor </$checkbox>
:<$checkbox tiddler=<<dynamictables-editortype>> field="text" checked="simple-textarea" unchecked="main-editor" default="simple-textarea"> Use simple text area </$checkbox>

0 comments on commit 13d18a3

Please sign in to comment.