HTML import and RTL

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

HTML import and RTL

Post by jgkoehn »

Greetings,
Do you know how to make RTL tags permanent so that Hebrew order is corrected without the RTL tags when importing html?
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: HTML import and RTL

Post by jgkoehn »

Let me explain a bit better:
There can be: <bdo dir="ltr">....</bdo> or <bdo dir="rtl">....</bdo> I am not sure these are supported in the new Html or the old. They don't seem to be I understand they are complex.
If I use these &#8237; OR &#8236; OR &#8238;
It would be nice that they would be hmms permanent and not just a tag if that makes sense. LIke the actual Hebrew or text inside would get reversed as needed.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: HTML import and RTL

Post by Sergey Tkachenko »

TRichView does not support <bdo> because it does not support this type of specifying text direction.

<bdo> specifies text direction ignoring bidirectional properties of text. You can use <bdo> to display English text RTL:

Code: Select all

<bdo dir="rtl">Text</bdo>
displays:
txeT
You cannot do the same in TRichView. In TRichView, you can only define the default text direction that affects bidi-neurtal characters but does not affect characters with strong bi-di properties.
Also, TRichView does not support multiple bidi levels.
In TRichView, you can define BiDiMode for text and paragraph, specifying the default direction in a paragraph or in a text fragment. HTML analog is CSS direction property.
Currently, this property is saved in HTML, but is not loaded. It will be implemented in the next TRichView update.
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: HTML import and RTL

Post by jgkoehn »

So in the next update it would come in as reversed then? Also would it work on Hebrew? This is more complex due to vowel points as you know.

Perhaps a better question what would it look like once the update happens?
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: HTML import and RTL

Post by Sergey Tkachenko »

In the next update, I plan to import CSS direction property in BiDiMode property of text and paragraphs. This property defines the default text direction in a text fragment or a paragraph.
No other bidi-related changes are planned.
TRichView always displays Hebrew text RTL, and English text LTR. This property affects neutral characters, like punctuation. Also, paragraph's BiDiMode affects position of list markers (at the right side for RTL paragraphs).
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: HTML import and RTL

Post by jgkoehn »

Thanks for the information!
Post Reply