From a05302da10de8404ca5aff793c661260673c4dfd Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Wed, 21 Jun 2023 17:13:33 +0100 Subject: [PATCH] Revert "Bidirectional text improvements (#4541)" This reverts commit f90eb386ae7cd7da0f18b8d53fb0e454d9486d75. --- core/modules/editor/engines/framed.js | 4 -- core/modules/editor/engines/simple.js | 3 -- core/modules/editor/factory.js | 3 +- core/modules/parsers/wikiparser/rules/dir.js | 51 ------------------- core/modules/parsers/wikiparser/wikiparser.js | 1 - core/modules/widgets/edit.js | 3 +- core/modules/widgets/reveal.js | 6 +-- core/templates/single.tiddler.window.tid | 3 +- core/ui/EditTemplate.tid | 1 - core/ui/EditTemplate/body-editor.tid | 1 - core/ui/EditTemplate/body/default.tid | 4 +- core/ui/EditTemplate/controls.tid | 2 +- core/ui/EditTemplate/fields.tid | 4 +- core/ui/EditTemplate/shadow.tid | 4 +- core/ui/EditTemplate/tags.tid | 2 +- core/ui/EditTemplate/title.tid | 6 +-- core/ui/EditTemplate/type.tid | 2 +- core/ui/PageTemplate.tid | 3 +- core/ui/ViewTemplate.tid | 2 +- core/ui/ViewTemplate/body.tid | 2 +- core/ui/ViewTemplate/subtitle.tid | 2 +- core/ui/ViewTemplate/tags.tid | 2 +- core/ui/ViewTemplate/title.tid | 2 +- core/wiki/config/DefaultTextDirection.tid | 2 - .../tiddlers/Right-To-Left Languages.tid | 11 ---- .../tw5.com/tiddlers/pragmas/Pragma_ _dir.tid | 13 ----- plugins/tiddlywiki/codemirror/engine.js | 3 -- 27 files changed, 22 insertions(+), 120 deletions(-) delete mode 100644 core/modules/parsers/wikiparser/rules/dir.js delete mode 100644 core/wiki/config/DefaultTextDirection.tid delete mode 100644 editions/tw5.com/tiddlers/Right-To-Left Languages.tid delete mode 100644 editions/tw5.com/tiddlers/pragmas/Pragma_ _dir.tid diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 01b9974c2..a4cf983b0 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -72,9 +72,6 @@ function FramedEngine(options) { if(this.widget.editRows) { this.domNode.setAttribute("rows",this.widget.editRows); } - if(this.widget.editDir) { - this.domNode.setAttribute("dir",this.widget.editDir); - } if(this.widget.editTabIndex) { this.iframeNode.setAttribute("tabindex",this.widget.editTabIndex); } @@ -123,7 +120,6 @@ FramedEngine.prototype.copyStyles = function() { this.domNode.style["-webkit-text-fill-color"] = "currentcolor"; // Ensure we don't force text direction to LTR this.domNode.style.removeProperty("direction"); - this.domNode.style.removeProperty("unicodeBidi"); }; /* diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index 64c087133..9840cb623 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -52,9 +52,6 @@ function SimpleEngine(options) { if(this.widget.editTabIndex) { this.domNode.setAttribute("tabindex",this.widget.editTabIndex); } - if(this.widget.editDir) { - this.domNode.setAttribute("dir",this.widget.editDir); - } if(this.widget.editAutoComplete) { this.domNode.setAttribute("autocomplete",this.widget.editAutoComplete); } diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index 7e43f709b..6157ec67f 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -183,7 +183,6 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { this.editFocusSelectFromStart = $tw.utils.parseNumber(this.getAttribute("focusSelectFromStart","0")); this.editFocusSelectFromEnd = $tw.utils.parseNumber(this.getAttribute("focusSelectFromEnd","0")); this.editTabIndex = this.getAttribute("tabindex"); - this.editDir = this.getAttribute("dir"); this.editCancelPopups = this.getAttribute("cancelPopups","") === "yes"; this.editInputActions = this.getAttribute("inputActions"); this.editRefreshTitle = this.getAttribute("refreshTitle"); @@ -221,7 +220,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { EditTextWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); // Completely rerender if any of our attributes have changed - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.dir || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) { + if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) { this.refreshSelf(); return true; } else if (changedTiddlers[this.editRefreshTitle]) { diff --git a/core/modules/parsers/wikiparser/rules/dir.js b/core/modules/parsers/wikiparser/rules/dir.js deleted file mode 100644 index e30fe7a47..000000000 --- a/core/modules/parsers/wikiparser/rules/dir.js +++ /dev/null @@ -1,51 +0,0 @@ -/*\ -title: $:/core/modules/parsers/wikiparser/rules/dir.js -type: application/javascript -module-type: wikirule - -Wiki pragma rule for specifying text direction - -``` -\dir rtl -\dir ltr -\dir auto -``` - -\*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ -"use strict"; - -exports.name = "dir"; -exports.types = {pragma: true}; - -/* -Instantiate parse rule -*/ -exports.init = function(parser) { - this.parser = parser; - // Regexp to match - this.matchRegExp = /^\\dir[^\S\n]*(\S+)\r?\n/mg; -}; - -/* -Parse the most recent match -*/ -exports.parse = function() { - var self = this; - // Move past the pragma invocation - this.parser.pos = this.matchRegExp.lastIndex; - // Parse tree nodes to return - return [{ - type: "element", - tag: this.parser.parseAsInline ? "span" : "div", - attributes: { - dir: {type: "string", value: this.match[1]} - }, - children: [] - }]; -}; - -})(); diff --git a/core/modules/parsers/wikiparser/wikiparser.js b/core/modules/parsers/wikiparser/wikiparser.js index 9cdb91913..bb457b205 100644 --- a/core/modules/parsers/wikiparser/wikiparser.js +++ b/core/modules/parsers/wikiparser/wikiparser.js @@ -36,7 +36,6 @@ options: see below: */ var WikiParser = function(type,text,options) { this.wiki = options.wiki; - this.parseAsInline = options.parseAsInline; var self = this; // Check for an externally linked tiddler if($tw.browser && (text || "") === "" && options._canonical_uri) { diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index ce72f0926..e7bd49b93 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -48,7 +48,6 @@ EditWidget.prototype.execute = function() { this.editPlaceholder = this.getAttribute("placeholder"); this.editTabIndex = this.getAttribute("tabindex"); this.editFocus = this.getAttribute("focus",""); - this.editDir = this.getAttribute("dir"); this.editCancelPopups = this.getAttribute("cancelPopups",""); this.editInputActions = this.getAttribute("inputActions"); this.editRefreshTitle = this.getAttribute("refreshTitle"); @@ -91,7 +90,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of EditWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); // Refresh if an attribute has changed, or the type associated with the target tiddler has changed - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.dir || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) { + if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/reveal.js b/core/modules/widgets/reveal.js index fde810439..3e3510f75 100755 --- a/core/modules/widgets/reveal.js +++ b/core/modules/widgets/reveal.js @@ -42,9 +42,6 @@ RevealWidget.prototype.render = function(parent,nextSibling) { if(this.style) { domNode.setAttribute("style",this.style); } - if(this.direction) { - domNode.setAttribute("dir",this.direction); - } parent.insertBefore(domNode,nextSibling); this.renderChildren(domNode,null); if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) { @@ -126,7 +123,6 @@ RevealWidget.prototype.execute = function() { this["default"] = this.getAttribute("default",""); this.animate = this.getAttribute("animate","no"); this.retain = this.getAttribute("retain","no"); - this.direction = this.getAttribute("dir"); this.openAnimation = this.animate === "no" ? undefined : "open"; this.closeAnimation = this.animate === "no" ? undefined : "close"; this.updatePopupPosition = this.getAttribute("updatePopupPosition","no") === "yes"; @@ -218,7 +214,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ RevealWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes.positionAllowNegative || changedAttributes["default"] || changedAttributes.animate || changedAttributes.stateTitle || changedAttributes.stateField || changedAttributes.stateIndex || changedAttributes.dir) { + if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes.positionAllowNegative || changedAttributes["default"] || changedAttributes.animate || changedAttributes.stateTitle || changedAttributes.stateField || changedAttributes.stateIndex) { this.refreshSelf(); return true; } else { diff --git a/core/templates/single.tiddler.window.tid b/core/templates/single.tiddler.window.tid index 48ce49247..aa5175c01 100644 --- a/core/templates/single.tiddler.window.tid +++ b/core/templates/single.tiddler.window.tid @@ -12,8 +12,7 @@ tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$ tv-config-toolbar-class={{$:/config/Toolbar/ButtonClass}} tv-show-missing-links={{$:/config/MissingLinks}} storyviewTitle={{$:/view}} - languageTitle={{{ [{$:/language}get[name]] }}} - tv-text-direction={{$:/config/DefaultTextDirection}}> + languageTitle={{{ [{$:/language}get[name]] }}}>
>> diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index 4ddea2a62..5aed61a73 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -29,7 +29,6 @@ title: $:/core/ui/EditTemplate data-tiddler-title=<> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-edit-frame [is[tiddler]then[tc-tiddler-exists]] [is[missing]!is[shadow]then[tc-tiddler-missing]] [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [is[system]then[tc-tiddler-system]] [{!!class}] [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} - dir=<> role="region" aria-label={{$:/language/EditTemplate/Caption}}> <$fieldmangler> diff --git a/core/ui/EditTemplate/body-editor.tid b/core/ui/EditTemplate/body-editor.tid index 8d17c498e..374567acd 100644 --- a/core/ui/EditTemplate/body-editor.tid +++ b/core/ui/EditTemplate/body-editor.tid @@ -9,7 +9,6 @@ title: $:/core/ui/EditTemplate/body/editor placeholder={{$:/language/EditTemplate/Body/Placeholder}} tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}} - dir=<> cancelPopups="yes" fileDrop={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} diff --git a/core/ui/EditTemplate/body/default.tid b/core/ui/EditTemplate/body/default.tid index 069a43d1a..a2128efb0 100644 --- a/core/ui/EditTemplate/body/default.tid +++ b/core/ui/EditTemplate/body/default.tid @@ -15,7 +15,7 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$ importState=<> > <$dropzone importTitle=<> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<> > <$reveal stateTitle=<> type="match" text="yes" tag="div"> -
>> +
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/> @@ -32,7 +32,7 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
-<$reveal stateTitle=<> type="nomatch" text="yes" tag="div" dir=<>> +<$reveal stateTitle=<> type="nomatch" text="yes" tag="div"> <$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/> diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index 2dd8709ae..3e94d371d 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -5,7 +5,7 @@ tags: $:/tags/EditTemplate $:/config/EditToolbarButtons/Visibility/$(listItem)$ \end \whitespace trim -
>> +
<$view field="title"/> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]]}}}><$reveal type="nomatch" state=<> text="hide"><$transclude tiddler=<>/>
diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index 438456455..6a767517b 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -74,7 +74,7 @@ $value={{{ [subfilterget[text]] }}}/> \whitespace trim <$set name="newFieldValueTiddlerPrefix" value=<> emptyValue=<> > -
>> +
<$list filter="[all[current]fields[]] +[sort[title]]" variable="currentField" storyview="pop"> @@ -101,7 +101,7 @@ $value={{{ [subfilterget[text]] }}}/> <$fieldmangler> -
>> +
<> diff --git a/core/ui/EditTemplate/shadow.tid b/core/ui/EditTemplate/shadow.tid index 97672750e..3ae3e0a1f 100644 --- a/core/ui/EditTemplate/shadow.tid +++ b/core/ui/EditTemplate/shadow.tid @@ -14,7 +14,7 @@ tags: $:/tags/EditTemplate <$list filter="[all[current]shadowsource[]]" variable="pluginTitle"> <$set name="pluginLink" value=<>> -
>> +
<> @@ -29,7 +29,7 @@ tags: $:/tags/EditTemplate <$list filter="[all[current]shadowsource[]]" variable="pluginTitle"> <$set name="pluginLink" value=<>> -
>> +
<> diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index 0456e1bb7..5084478b4 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -27,7 +27,7 @@ color:$(foregroundColor)$; \define edit-tags-template(tagField:"tags") \whitespace trim -
>> +
<$list filter="[list[!!$tagField$]sort[title]]" storyview="pop"> <$macrocall $name="tag-body" colour={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} icon={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} tagField=<<__tagField__>>/> diff --git a/core/ui/EditTemplate/title.tid b/core/ui/EditTemplate/title.tid index fa02db819..5228ad7c0 100644 --- a/core/ui/EditTemplate/title.tid +++ b/core/ui/EditTemplate/title.tid @@ -2,13 +2,13 @@ title: $:/core/ui/EditTemplate/title tags: $:/tags/EditTemplate \whitespace trim -<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes" dir=<>/> +<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/> <$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`"""> <$list filter="[all[current]regexp:draft.title]" variable="listItem"> -
>> +
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}} @@ -18,7 +18,7 @@ tags: $:/tags/EditTemplate -<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div" dir=<>> +<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div"> <$list filter="[{!!draft.title}!is[missing]]" variable="listItem"> diff --git a/core/ui/EditTemplate/type.tid b/core/ui/EditTemplate/type.tid index 0dca582e1..faa89639f 100644 --- a/core/ui/EditTemplate/type.tid +++ b/core/ui/EditTemplate/type.tid @@ -9,7 +9,7 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
<>
-
>}><$fieldmangler> +
<$fieldmangler> <$macrocall $name="keyboard-driven-input" tiddler=<> storeTitle=<> refreshTitle=<> selectionStateTitle=<> field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}} cancelPopups="yes" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<>/><$button popup=<> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}<$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}<$action-deletetiddler $filter="[] [] []"/>
diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index faf1a06b6..f0ab4852a 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -13,8 +13,7 @@ icon: $:/core/images/layout-button tv-enable-drag-and-drop={{$:/config/DragAndDrop/Enable}} tv-show-missing-links={{$:/config/MissingLinks}} storyviewTitle={{$:/view}} - languageTitle={{{ [{$:/language}get[name]] }}} - tv-text-direction={{$:/config/DefaultTextDirection}}> + languageTitle={{{ [{$:/language}get[name]] }}}>
] [[tc-language-]addsuffix] :and[unique[]join[ ]] }}} > diff --git a/core/ui/ViewTemplate.tid b/core/ui/ViewTemplate.tid index 3f39f3496..dcba5c953 100644 --- a/core/ui/ViewTemplate.tid +++ b/core/ui/ViewTemplate.tid @@ -7,7 +7,7 @@ $:/state/folded/$(currentTiddler)$ \define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/> \import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]] <$vars storyTiddler=<> tiddlerInfoState=<>> -
> data-tiddler-title=<> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [is[tiddler]then[tc-tiddler-exists]] [is[missing]!is[shadow]then[tc-tiddler-missing]] [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [is[system]then[tc-tiddler-system]] [{!!class}] [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article"> +
> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [is[tiddler]then[tc-tiddler-exists]] [is[missing]!is[shadow]then[tc-tiddler-missing]] [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [is[system]then[tc-tiddler-system]] [{!!class}] [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!is[draft]]" variable="listItem"> <$transclude tiddler=<>/> diff --git a/core/ui/ViewTemplate/body.tid b/core/ui/ViewTemplate/body.tid index 36cac1e18..34e6aaa38 100644 --- a/core/ui/ViewTemplate/body.tid +++ b/core/ui/ViewTemplate/body.tid @@ -3,7 +3,7 @@ tags: $:/tags/ViewTemplate \import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]] -<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<> text="hide" retain="yes" animate="yes" dir=<>> +<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<> text="hide" retain="yes" animate="yes"> <$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} /> diff --git a/core/ui/ViewTemplate/subtitle.tid b/core/ui/ViewTemplate/subtitle.tid index 611130869..a0436b095 100644 --- a/core/ui/ViewTemplate/subtitle.tid +++ b/core/ui/ViewTemplate/subtitle.tid @@ -3,7 +3,7 @@ tags: $:/tags/ViewTemplate \whitespace trim <$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> -
>> +
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler" counter="indexSubtitleTiddler"> <$list filter="[match[no]]" variable="ignore">   diff --git a/core/ui/ViewTemplate/tags.tid b/core/ui/ViewTemplate/tags.tid index 95b5dbe39..d1f4e55c9 100644 --- a/core/ui/ViewTemplate/tags.tid +++ b/core/ui/ViewTemplate/tags.tid @@ -3,5 +3,5 @@ tags: $:/tags/ViewTemplate \whitespace trim <$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> -
>><$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
+
<$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 19d375068..98695f6bf 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -6,7 +6,7 @@ tags: $:/tags/ViewTemplate fill:$(foregroundColor)$; \end
-
>> +
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" storyview="pop" variable="listItem"><$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"><$transclude tiddler=<>/> diff --git a/core/wiki/config/DefaultTextDirection.tid b/core/wiki/config/DefaultTextDirection.tid deleted file mode 100644 index 6140bbf7b..000000000 --- a/core/wiki/config/DefaultTextDirection.tid +++ /dev/null @@ -1,2 +0,0 @@ -title: $:/config/DefaultTextDirection -text: auto diff --git a/editions/tw5.com/tiddlers/Right-To-Left Languages.tid b/editions/tw5.com/tiddlers/Right-To-Left Languages.tid deleted file mode 100644 index d32d01524..000000000 --- a/editions/tw5.com/tiddlers/Right-To-Left Languages.tid +++ /dev/null @@ -1,11 +0,0 @@ -created: 20230613162508509 -modified: 20230613162508509 -title: Right-To-Left Languages -type: text/vnd.tiddlywiki - -<<.from-version "5.3.0">> The [[language plugins|Languages]] in TiddlyWiki's plugin library apply the appropriate [["right-to-left" setting|https://www.w3.org/International/questions/qa-html-dir]] to the entire document. To set the right to left setting independently for an individual tiddler, use the `\dir` [[pragma|Pragma]] at the top of the tiddler: - -``` -\dir rtl -This text will be displayed with right-to-left formatting -``` diff --git a/editions/tw5.com/tiddlers/pragmas/Pragma_ _dir.tid b/editions/tw5.com/tiddlers/pragmas/Pragma_ _dir.tid deleted file mode 100644 index bc5774e30..000000000 --- a/editions/tw5.com/tiddlers/pragmas/Pragma_ _dir.tid +++ /dev/null @@ -1,13 +0,0 @@ -created: 20230613162508509 -modified: 20230613162508509 -tags: Pragmas -title: Pragma: \dir -type: text/vnd.tiddlywiki - -<<.from-version "5.3.0">> The ''\dir'' [[pragma|Pragmas]] is used to set the text direction of text within a tiddler -- see [[Right-To-Left Languages]]. - -The ''\dir'' pragma should be used after any procedure, function, widget or macro definitions. - -* `\dir ltr` – sets text direction to left-to-right -* `\dir rtl` – sets text direction to right-to-left -* `\dir auto` – causes the browser to attempt to automatically deduce the text direction diff --git a/plugins/tiddlywiki/codemirror/engine.js b/plugins/tiddlywiki/codemirror/engine.js index e8749481d..e775e1c95 100755 --- a/plugins/tiddlywiki/codemirror/engine.js +++ b/plugins/tiddlywiki/codemirror/engine.js @@ -109,9 +109,6 @@ function CodeMirrorEngine(options) { if(this.widget.editTabIndex) { config["tabindex"] = this.widget.editTabIndex; } - if(this.widget.editDir) { - config.direction = this.widget.editDir; - } config.editWidget = this.widget; // Create the CodeMirror instance this.cm = window.CodeMirror(function(cmDomNode) {