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]] }}}>