Notion.so RTL support for written text

Add support for writing RTL text blocks (including todo list, bullet list, headings, etc.) Text will change direction automatically depending on the language of the first letter in a text block. (Thus, English text will remain with the same behavior) Could be helpful if you want to write a text or todo list in your RTL language. Multiple languages with different directions can be written on the same page. This script is not supposed to change the direction of databases views nor its inner cells

作者
orenk
日安装量
0
总安装量
1,761
评分
1 0 1
版本
0.4
创建于
2020-03-21
更新于
2020-03-23
大小
4.0 KB
许可证
暂无
适用于

Description

Add support for writing RTL text blocks (including todo list, bullet list, headings, etc..)
Text will change direction automatically depending on the language of the first letter in a text block (Thus, English text will remain with the same behavior)
Could be helpful if you'd like to write text or todo list in your RTL language
Multiple languages with different directions can be written on the same page

Disclosure

This script is not supposed to change the direction of databases views nor its inner cells

Technical description

Changes dir attribute of page's div elements to 'auto' and forcing align and unicode automatic detection style on selectable blocks. Using MutationObserver in order to listen to newly added blocks. Written with performance in mind.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址