-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems when using languages that use ltr instead of rtl #1928
Comments
In my exploring the code, I have found that lists are implemented by hard coding the checkbox (or list number) into the left edge of the display irrespective of ltr or rtl. |
I see the direction attribute, and i guess this one works on one way: If you want to force the content be You can see this on Attribute file: // "attributes":{"direction":"rtl"}
static const Attribute<String?> rtl = DirectionAttribute('rtl'); And this is the default attribute: static const DirectionAttribute direction = DirectionAttribute(null); I think this behavior is weird |
You can also see this on
This get the
This is the whole code from TextDirection getDirectionOfNode(Node node) {
final direction = node.style.attributes[Attribute.direction.key];
if (direction == Attribute.rtl) {
return TextDirection.rtl;
}
return TextDirection.ltr;
} But i think this just be applying the |
We need an expert in right-to-left to get involved with a review of the whole concept. @CatHood0 you can look at EditableTextLine in text_line.dart which contains a widget called 'leading'. |
I think the same too.
I'll try to fix it. |
This will be complex |
It was more easy that i thinked |
Looks good to me - well done.
I think RTL can be set by the programmer in one of the configurations. QuillSimpleToolbarConfigurations has a setting for: this.showDirection = false, There is also an attribute for rtl/ltr. Is this now obsolete? Should we remove DirectionAttribute? |
By default, the editor will use the same local as the one in the Which will use the same direction as the local, the local can be overridden, I'm not sure why this fix manually check the language or why currently we have a bug. |
I didn't have idea about
This is because on |
We will just need to modify the logic getting the direction from the configurations. But, i don't know if we need to do it. |
Is there an existing issue for this?
Flutter Quill version
9.4.2
Steps to reproduce
problem with languages that use ltr instead of rtl, DirectionAttribute('ltr');
When I touch the enumerated list or checkbox option, even when using ltr in languages like Hebrew, the checkboxes and enumerated lists do not change, they remain in the position as if using rtl
Expected results
checkbox and the list number go to the beginning of the line on the right side
Actual results
checkbox and list number are at the beginning of the line on the left side
Code sample
default quill
Screenshots or Video
No response
Logs
No response
The text was updated successfully, but these errors were encountered: