mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-05 21:33:52 +00:00
Merge branch 'upstream/master'
This commit is contained in:
commit
09b1364cad
@ -16,14 +16,16 @@ Filter operator for returning the descriptions of the specified edition names
|
|||||||
Export our filter function
|
Export our filter function
|
||||||
*/
|
*/
|
||||||
exports.editiondescription = function(source,operator,options) {
|
exports.editiondescription = function(source,operator,options) {
|
||||||
var results = [],
|
var results = [];
|
||||||
editionInfo = $tw.utils.getEditionInfo();
|
if($tw.node) {
|
||||||
if(editionInfo) {
|
var editionInfo = $tw.utils.getEditionInfo();
|
||||||
source(function(tiddler,title) {
|
if(editionInfo) {
|
||||||
if($tw.utils.hop(editionInfo,title)) {
|
source(function(tiddler,title) {
|
||||||
results.push(editionInfo[title].description || "");
|
if($tw.utils.hop(editionInfo,title)) {
|
||||||
}
|
results.push(editionInfo[title].description || "");
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
@ -16,14 +16,16 @@ Filter operator for returning the names of the available editions in this wiki
|
|||||||
Export our filter function
|
Export our filter function
|
||||||
*/
|
*/
|
||||||
exports.editions = function(source,operator,options) {
|
exports.editions = function(source,operator,options) {
|
||||||
var results = [],
|
var results = [];
|
||||||
editionInfo = $tw.utils.getEditionInfo();
|
if($tw.node) {
|
||||||
if(editionInfo) {
|
var editionInfo = $tw.utils.getEditionInfo();
|
||||||
$tw.utils.each(editionInfo,function(info,name) {
|
if(editionInfo) {
|
||||||
results.push(name);
|
$tw.utils.each(editionInfo,function(info,name) {
|
||||||
});
|
results.push(name);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
results.sort();
|
||||||
}
|
}
|
||||||
results.sort();
|
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,9 +56,9 @@ exports.warning = function(text) {
|
|||||||
/*
|
/*
|
||||||
Log a table of name: value pairs
|
Log a table of name: value pairs
|
||||||
*/
|
*/
|
||||||
exports.logTable = function(data,columnNames) {
|
exports.logTable = function(data) {
|
||||||
if(console.table) {
|
if(console.table) {
|
||||||
console.table(data,columnNames);
|
console.table(data);
|
||||||
} else {
|
} else {
|
||||||
$tw.utils.each(data,function(value,name) {
|
$tw.utils.each(data,function(value,name) {
|
||||||
console.log(name + ": " + value);
|
console.log(name + ": " + value);
|
||||||
|
@ -78,11 +78,11 @@ LogWidget.prototype.log = function() {
|
|||||||
|
|
||||||
console.group(this.message);
|
console.group(this.message);
|
||||||
if(dataCount > 0) {
|
if(dataCount > 0) {
|
||||||
$tw.utils.logTable(data,["name","value"]);
|
$tw.utils.logTable(data);
|
||||||
}
|
}
|
||||||
if(this.logAll || !dataCount) {
|
if(this.logAll || !dataCount) {
|
||||||
console.groupCollapsed("All variables");
|
console.groupCollapsed("All variables");
|
||||||
$tw.utils.logTable(allVars,["name","value"]);
|
$tw.utils.logTable(allVars);
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
}
|
}
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
|
@ -56,14 +56,15 @@ MacroCallWidget.prototype.execute = function() {
|
|||||||
if(this.renderOutput === "text/html") {
|
if(this.renderOutput === "text/html") {
|
||||||
// If so we'll return the parsed macro
|
// If so we'll return the parsed macro
|
||||||
// Check if we've already cached parsing this macro
|
// Check if we've already cached parsing this macro
|
||||||
var parser;
|
var mode = this.parseTreeNode.isBlock ? "blockParser" : "inlineParser",
|
||||||
if(variableInfo.srcVariable && variableInfo.srcVariable.parser) {
|
parser;
|
||||||
parser = variableInfo.srcVariable.parser;
|
if(variableInfo.srcVariable && variableInfo.srcVariable[mode]) {
|
||||||
|
parser = variableInfo.srcVariable[mode];
|
||||||
} else {
|
} else {
|
||||||
parser = this.wiki.parseText(this.parseType,text,
|
parser = this.wiki.parseText(this.parseType,text,
|
||||||
{parseAsInline: !this.parseTreeNode.isBlock});
|
{parseAsInline: !this.parseTreeNode.isBlock});
|
||||||
if(variableInfo.isCacheable && variableInfo.srcVariable) {
|
if(variableInfo.isCacheable && variableInfo.srcVariable) {
|
||||||
variableInfo.srcVariable.parser = parser;
|
variableInfo.srcVariable[mode] = parser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var parseTreeNodes = parser ? parser.tree : [];
|
var parseTreeNodes = parser ? parser.tree : [];
|
||||||
|
@ -2,6 +2,7 @@ title: $:/core/templates/exporters/TidFile
|
|||||||
tags: $:/tags/Exporter
|
tags: $:/tags/Exporter
|
||||||
description: {{$:/language/Exporters/TidFile}}
|
description: {{$:/language/Exporters/TidFile}}
|
||||||
extension: .tid
|
extension: .tid
|
||||||
|
condition: [<count>compare:lte[1]]
|
||||||
|
|
||||||
\define renderContent()
|
\define renderContent()
|
||||||
{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}
|
{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}
|
||||||
|
@ -148,7 +148,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
|
|
||||||
<$set name="transclusion" value=<<connectionTiddler>>>
|
<$set name="transclusion" value=<<connectionTiddler>>>
|
||||||
|
|
||||||
<$macrocall $name="tabs" tabsList="[[$:/core/ui/ControlPanel/Plugins/Add/Updates]] [[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]" default="$:/core/ui/ControlPanel/Plugins/Add/Plugins" explicitState="$:/state/addplugins/tab-1342078386"/>
|
<<tabs "[[$:/core/ui/ControlPanel/Plugins/Add/Updates]] [[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]" "$:/core/ui/ControlPanel/Plugins/Add/Plugins">>
|
||||||
|
|
||||||
</$set>
|
</$set>
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@ tags: $:/tags/TiddlerInfo
|
|||||||
caption: {{$:/language/TiddlerInfo/Advanced/Caption}}
|
caption: {{$:/language/TiddlerInfo/Advanced/Caption}}
|
||||||
|
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]" variable="listItem">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]" variable="listItem">
|
||||||
<$transclude tiddler=<<listItem>>/>
|
|
||||||
|
|
||||||
|
<$transclude tiddler=<<listItem>> mode="block"/>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
title: $:/core/ui/ViewTemplate/plugin
|
title: $:/core/ui/ViewTemplate/plugin
|
||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
|
<$reveal tag="div" class="tc-tiddler-plugin-info" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
|
||||||
|
|
||||||
<$list filter="[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]">
|
<$list filter="[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]">
|
||||||
<$set name="plugin-type" value={{!!plugin-type}}>
|
<$set name="plugin-type" value={{!!plugin-type}}>
|
||||||
<$set name="default-popup-state" value="yes">
|
<$set name="default-popup-state" value="yes">
|
||||||
@ -10,3 +12,4 @@ tags: $:/tags/ViewTemplate
|
|||||||
</$set>
|
</$set>
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
|
</$reveal>
|
@ -15,7 +15,9 @@ $baseFilename$$(extension)$
|
|||||||
</$list>
|
</$list>
|
||||||
</$button></span><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
</$button></span><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
||||||
<div class="tc-drop-down">
|
<div class="tc-drop-down">
|
||||||
|
<$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}>
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
||||||
|
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" variable="ignore">
|
||||||
<$set name="extension" value={{!!extension}}>
|
<$set name="extension" value={{!!extension}}>
|
||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename=<<exportButtonFilename """$baseFilename$""">>/>
|
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename=<<exportButtonFilename """$baseFilename$""">>/>
|
||||||
@ -24,6 +26,8 @@ $baseFilename$$(extension)$
|
|||||||
</$button>
|
</$button>
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
|
</$list>
|
||||||
|
</$set>
|
||||||
</div>
|
</div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
\end
|
\end
|
||||||
|
@ -29,3 +29,21 @@ Here is an example of an alternative visualisation that displays results in reve
|
|||||||
<<searchResults>>
|
<<searchResults>>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<<.from-version 5.1.23>> The sidebar search introduces a more sophisticated search-mechanism which makes it possible to navigate the search results using the keyboard shortcuts <kbd><<displayshortcuts ((input-down))>></kbd> and <kbd><<displayshortcuts ((input-up))>></kbd>. To add that mechanism to your own custom search results follow these simple steps:
|
||||||
|
|
||||||
|
# Your tiddler tagged <<tag-pill "$:/tags/SearchResults">>is accessible through the <<.var configTiddler>> variable
|
||||||
|
# The user-input in the search field is accessible through the <<.var userInput>> variable
|
||||||
|
# Use the fields <<.field first-search-filter>> and <<.field second-search-filter>> to store the filters used for your search results. See the tiddler $:/core/ui/DefaultSearchResultList for details
|
||||||
|
# Use the following form so that navigated search-results are highlighted, modify it to match your needs:
|
||||||
|
|
||||||
|
```
|
||||||
|
<$list filter="[<userInput>minlength[1]]" variable="ignore">
|
||||||
|
<$list filter={{{ [<configTiddler>get[first-search-filter]] }}}>
|
||||||
|
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[<searchListState>get[text]] +[then[]else[tc-list-item-selected]] }}}>
|
||||||
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
|
</span>
|
||||||
|
</$list>
|
||||||
|
</$list>
|
||||||
|
```
|
||||||
|
|
||||||
|
<$macrocall $name=".tip" _="Note that the <<.var searchTiddler>> variable still contains the name of the tiddler that is used for sorting the search results. The <<.var editTiddler>> variable contains the name of the tiddler that is being edited."/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
title: keyboard-driven-input Macro
|
title: keyboard-driven-input Macro
|
||||||
tags: Macros [[Core Macros]]
|
tags: Macros [[Core Macros]]
|
||||||
|
|
||||||
The <<.def keyboard-driven-input>> [[macro|Macros]] generates an input field or textarea that lets you cycle through a given list of entries with the <kbd>up</kbd> and <kbd>down</kbd> arrow keys. Doing so, an entry gets selected and can be processed with further actions
|
The <<.def keyboard-driven-input>> [[macro|Macros]] generates an input field or textarea that lets you cycle through a given list of entries with the <kbd><<displayshortcuts ((input-up))>></kbd> and <kbd><<displayshortcuts ((input-down))>></kbd> keys. Doing so, an entry gets selected and can be processed with further actions
|
||||||
|
|
||||||
!! Parameters
|
!! Parameters
|
||||||
|
|
||||||
@ -12,9 +12,9 @@ The additional parameters are:
|
|||||||
|parameter |purpose |h
|
|parameter |purpose |h
|
||||||
|storeTitle |the title of the tiddler that stores the user input |
|
|storeTitle |the title of the tiddler that stores the user input |
|
||||||
|selectionStateTitle |the title of the tiddler that stores the selected entry with a -primaryList or -secondaryList suffix to make it unique |
|
|selectionStateTitle |the title of the tiddler that stores the selected entry with a -primaryList or -secondaryList suffix to make it unique |
|
||||||
|inputAcceptActions |the actions that get processed when the user hits <kbd>{{$:/config/shortcuts/input-accept}}</kbd> |
|
|inputAcceptActions |the actions that get processed when the user hits <kbd><<displayshortcuts ((input-accept))>></kbd> |
|
||||||
|inputAcceptVariantActions |the actions that get processed when the user hits <kbd>{{$:/config/shortcuts/input-accept-variant}}</kbd> |
|
|inputAcceptVariantActions |the actions that get processed when the user hits <kbd><<displayshortcuts ((input-accept-variant))>></kbd> |
|
||||||
|inputCancelActions |the actions that get processed when the user hits <kbd>{{$:/config/shortcuts/input-cancel}}</kbd> |
|
|inputCancelActions |the actions that get processed when the user hits <kbd><<displayshortcuts ((input-cancel))>></kbd> |
|
||||||
|configTiddlerFilter |a ''filter'' that specifies the tiddler that stores the first item-filter in its <<.field first-search-filter>> field and the second item-filter in its <<.field second-search-filter>> field |
|
|configTiddlerFilter |a ''filter'' that specifies the tiddler that stores the first item-filter in its <<.field first-search-filter>> field and the second item-filter in its <<.field second-search-filter>> field |
|
||||||
|firstSearchFilterField |the field of the configTiddler where the first search-filter is stored. Defaults to <<.field first-search-filter>> |
|
|firstSearchFilterField |the field of the configTiddler where the first search-filter is stored. Defaults to <<.field first-search-filter>> |
|
||||||
|secondSearchFilterField |the field of the configTiddler where the second search-filter is stored. Defaults to <<.field second-search-filter>> |
|
|secondSearchFilterField |the field of the configTiddler where the second search-filter is stored. Defaults to <<.field second-search-filter>> |
|
||||||
|
@ -4,10 +4,14 @@ homeUrl: http://codemirror.net
|
|||||||
addOnUrl: http://codemirror.net/doc/manual.html#addons
|
addOnUrl: http://codemirror.net/doc/manual.html#addons
|
||||||
configUrl: http://codemirror.net/doc/manual.html#config
|
configUrl: http://codemirror.net/doc/manual.html#config
|
||||||
controlPanel/hint: These settings let you customise the behaviour of [[CodeMirror|$:/plugins/tiddlywiki/codemirror]].
|
controlPanel/hint: These settings let you customise the behaviour of [[CodeMirror|$:/plugins/tiddlywiki/codemirror]].
|
||||||
|
controlPanel/keyboard: Keyboard shortcuts
|
||||||
controlPanel/usage: Usage information
|
controlPanel/usage: Usage information
|
||||||
|
cursorBlinkRate/hint: Cursor blink rate
|
||||||
editorFont/hint: Editor font family
|
editorFont/hint: Editor font family
|
||||||
editorFont/info: Set the font family for the ~CodeMirror text-editor
|
editorFont/info: Set the font family for the ~CodeMirror text-editor
|
||||||
controlPanel/keyboard: Keyboard shortcuts
|
indentUnit/hint: How many spaces a block should be indented
|
||||||
|
indentWithTabs/hint: Enable indenting with tabs
|
||||||
|
indentWithTabs/info: Whether, when indenting, the first N*`tabSize` spaces should be replaced by N tabs.
|
||||||
keyMap/hint: ~CodeMirror keymap
|
keyMap/hint: ~CodeMirror keymap
|
||||||
keyMap/info: ~The Keyboard KeyMap used within the ~CodeMirror text-editor
|
keyMap/info: ~The Keyboard KeyMap used within the ~CodeMirror text-editor
|
||||||
lineNumbers/hint: Enable line numbers
|
lineNumbers/hint: Enable line numbers
|
||||||
@ -16,7 +20,10 @@ lineWrapping/hint: Enable line wrapping
|
|||||||
lineWrapping/info: Whether CodeMirror should scroll or wrap for long lines. Defaults to `false` (scroll).
|
lineWrapping/info: Whether CodeMirror should scroll or wrap for long lines. Defaults to `false` (scroll).
|
||||||
showCursorWhenSelecting/hint: Show cursor, when selecting
|
showCursorWhenSelecting/hint: Show cursor, when selecting
|
||||||
showCursorWhenSelecting/info: Whether the cursor should be drawn when a selection is active.
|
showCursorWhenSelecting/info: Whether the cursor should be drawn when a selection is active.
|
||||||
|
smartIndent/hint: Enable smart indent
|
||||||
|
smartIndent/info: Whether to use the context-sensitive indentation that the mode provides (or just indent the same as the line before). Defaults to `true`.
|
||||||
styleActiveLine/hint: Highlight active line
|
styleActiveLine/hint: Highlight active line
|
||||||
styleActiveLine/info: Whether or not to highlight the active text-editor line
|
styleActiveLine/info: Whether or not to highlight the active text-editor line
|
||||||
|
tabSize/hint: Width of a tab character
|
||||||
theme/hint: Select a theme
|
theme/hint: Select a theme
|
||||||
theme/info: Choose between ~CodeMirror themes
|
theme/info: Choose between ~CodeMirror themes
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/Settings/codemirror/cursorBlinkRate
|
||||||
|
tags: $:/tags/ControlPanel/Settings/CodeMirror
|
||||||
|
caption: {{$:/language/codemirror/cursorBlinkRate/hint}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/codemirror/cursorBlinkRate/
|
||||||
|
|
||||||
|
|<$link to="$:/config/codemirror/cursorBlinkRate"><<lingo hint>></$link> |<$edit-text tiddler="$:/config/codemirror/cursorBlinkRate" default="" placeholder="cursorBlinkRate" tag="input"/> |
|
7
plugins/tiddlywiki/codemirror/settings/indentUnit.tid
Normal file
7
plugins/tiddlywiki/codemirror/settings/indentUnit.tid
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/Settings/codemirror/indentUnit
|
||||||
|
tags: $:/tags/ControlPanel/Settings/CodeMirror
|
||||||
|
caption: {{$:/language/codemirror/indentUnit/hint}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/codemirror/indentUnit/
|
||||||
|
|
||||||
|
|<$link to="$:/config/codemirror/indentUnit"><<lingo hint>></$link> |<$edit-text tiddler="$:/config/codemirror/indentUnit" default="" placeholder="indentUnit" tag="input"/> |
|
@ -0,0 +1,8 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/Settings/codemirror/indentWithTabs
|
||||||
|
tags: $:/tags/ControlPanel/Settings/CodeMirror
|
||||||
|
caption: {{$:/language/codemirror/indentWithTabs/hint}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/codemirror/indentWithTabs/
|
||||||
|
<<lingo hint>>
|
||||||
|
|
||||||
|
<$checkbox tiddler="$:/config/codemirror/indentWithTabs" field="text" checked="true" unchecked="false" default="true"> <$link to="$:/config/codemirror/indentWithTabs"><<lingo info>></$link> </$checkbox>
|
8
plugins/tiddlywiki/codemirror/settings/smartIndent.tid
Normal file
8
plugins/tiddlywiki/codemirror/settings/smartIndent.tid
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/Settings/codemirror/smartIndent
|
||||||
|
tags: $:/tags/ControlPanel/Settings/CodeMirror
|
||||||
|
caption: {{$:/language/codemirror/smartIndent/hint}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/codemirror/smartIndent/
|
||||||
|
<<lingo hint>>
|
||||||
|
|
||||||
|
<$checkbox tiddler="$:/config/codemirror/smartIndent" field="text" checked="true" unchecked="false" default="true"> <$link to="$:/config/codemirror/smartIndent"><<lingo info>></$link> </$checkbox>
|
7
plugins/tiddlywiki/codemirror/settings/tabSize.tid
Normal file
7
plugins/tiddlywiki/codemirror/settings/tabSize.tid
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
title: $:/core/ui/ControlPanel/Settings/codemirror/tabSize
|
||||||
|
tags: $:/tags/ControlPanel/Settings/CodeMirror
|
||||||
|
caption: {{$:/language/codemirror/tabSize/hint}}
|
||||||
|
|
||||||
|
\define lingo-base() $:/language/codemirror/tabSize/
|
||||||
|
|
||||||
|
|<$link to="$:/config/codemirror/tabSize"><<lingo hint>></$link> |<$edit-text tiddler="$:/config/codemirror/tabSize" default="" placeholder="tabSize" tag="input"/> |
|
@ -598,6 +598,10 @@ html body.tc-body .tc-btn-rounded:hover svg {
|
|||||||
color: <<colour sidebar-muted-foreground-hover>>;
|
color: <<colour sidebar-muted-foreground-hover>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tc-sidebar-lists button small {
|
||||||
|
color: <<colour foreground>>;
|
||||||
|
}
|
||||||
|
|
||||||
button svg.tc-image-button, button .tc-image-button img {
|
button svg.tc-image-button, button .tc-image-button img {
|
||||||
height: 1em;
|
height: 1em;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user