mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-07 08:31:42 +00:00
Bidirectional text improvements (#4541)
* Add support for \dir pragma
* Add "dir" attribute to reveal, edit, edit-text and edit-codemirror widgets
* Add $:/config/DefaultTextDirection hidden setting
* Revert accidentally commited test data
This reverts some of commit b83c1d160f.
* Remove Codemirror plugin from Prerelease
Makes it easier to test things
* Fix framed text editor directionality in Firefox
* Add direction attribute for edit body template
* Missed closing brace
* Add docs for \dir pragma
* Templates should set text direction from a variable, not a transclusion
* Updates to framed.js in the light of PRs that have been merged since this
* Restore whitespace trim
* Docs dates
* Fix typo
* Clarify docs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user