tldraw/packages
Mohammad Kazemi 085c3e5498
Fix textbox direction when it contains both RTL and LTR languages (#3188)
**Beofre:**

1. In a text box, text direction was set to Left-to-Right, regardless of
the text language.



**After:**
1. Text box direction is set to auto, so that it matches the direction
of text language.
2. Text dir is set to auto for each line of the text. To achieve this,
each line of text is now put in separated `<span>` tags with
`dir="auto"`.


![Screenshot_20240318_152725](https://github.com/tldraw/tldraw/assets/18334056/bfa8dd11-a2d1-46d0-b205-7a192c403fcd)


Note: Without putting each line of text into separated `<span>` tags,
whole text direction was in direction of initial line text. So each line
of text is now wrapped into separate tags.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

Enter a text right-to-left and left-to-right into textboxes and note the
change of direction by clicking outside of the box, before and after
this PR.

### Release Notes

Fix textbox direction when it contains both RTL and LTR languages

---------

Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-04-30 11:30:43 +00:00
..
assets Fix missing icons (#3654) 2024-04-30 10:39:53 +00:00
dotcom-shared make route prefixes have a single place where they are defined (#3624) 2024-04-27 10:57:55 +00:00
editor fix undo/redo issues (#3658) 2024-04-30 11:01:39 +00:00
namespaced-tldraw Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
state Revert "[signia] Smart dirty checking of active computeds (#3516)" (#3612) 2024-04-25 12:45:36 +00:00
store Automatic undo/redo (#3364) 2024-04-24 18:26:10 +00:00
tldraw Fix textbox direction when it contains both RTL and LTR languages (#3188) 2024-04-30 11:30:43 +00:00
tlschema Lokalise: Translations update (#3649) 2024-04-30 10:23:23 +00:00
tlsync delete untracked api.json and stale api-report.md files (#3619) 2024-04-25 17:27:28 +00:00
utils Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
validate Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00