super_editor icon indicating copy to clipboard operation
super_editor copied to clipboard

[BUG] -

Open ismail-go opened this issue 8 months ago • 1 comments

Hi again, I have an issue which is the same of the #2638

I reproduced the considered bug and it still occurs. @mohamadlounnas has solved the bug partially but not completely. If you do not have a better solution for the bug please merge it with main @matthew-carroll and @angelosilvestre. My issue was the similar with this. https://github.com/superlistapp/super_editor/issues/2472 .

And i have another request. The text direction is detected from input text in the ParagraphComponentBuilder. But if we do not have any character in the document it cannot starts from right for rtl languages. It starts from left and after the first input character it aligns to right. But we want that the caret should start from right and input characters should be the right side of the caret. As a solution for this issue you need to get a optional parameter as a textDirection for the ParagraphComponentBuilder. And after that we can set the direction of document dynamically. You can get Flutter TextFormField widget as a reference for the text direction @matthew-carroll @angelosilvestre

ismail-go avatar May 14 '25 08:05 ismail-go

And i have another request. The text direction is detected from input text in the ParagraphComponentBuilder. But if we do not have any character in the document it cannot starts from right for rtl languages. It starts from left and after the first input character it aligns to right. But we want that the caret should start from right and input characters should be the right side of the caret. As a solution for this issue you need to get a optional parameter as a textDirection for the ParagraphComponentBuilder. And after that we can set the direction of document dynamically. You can get Flutter TextFormField widget as a reference for the text direction

Let's keep this ticket tracking only this request, since there is another ticket for the first one.

@matthew-carroll Currently, we only infer the text direction from the component's text. To make it work correctly when the text is empty we would need the following changes:

  • Make TextComponentViewModel.textDirection nullable. BREAKING CHANGE!!
  • Make ParagraphComponentBuilder.createViewModel avoid providing a text alignment to the viewModel if the text is empty (and we don't have an explicit text alignment set)
  • Make ParagraphComponent use the enclosing directionality if the viewModel doesn't specify one

angelosilvestre avatar Jul 28 '25 23:07 angelosilvestre