RichTextKit icon indicating copy to clipboard operation
RichTextKit copied to clipboard

Newlines not being indenting until adding additional text

Open DavidAlvarezDev opened this issue 2 years ago • 3 comments

Hello,

Thanks for your great work, I just started a project this Friday, and you package has beet a huge help!

One problem that I have not been able to solve it to see the cursor indent after hitting enter on the keyboard (new line). The indent works fine if there is no next in the text editor field. It this seems like a bug to me, because the user would have to start typing on that new line before he sees the cursor indent.

I apologize if it is error on my part, but I can't find a workaround.

Thanks in advance,

David Alvarez [email protected]

DavidAlvarezDev avatar Jun 20 '23 18:06 DavidAlvarezDev

Hi @DavidAlvarezDev

Happy to hear that the library has helped you out :)

The rich text editor is just a thin wrapper over the native UITextView and NSTextView. Do you see the same issue when using those views?

danielsaidi avatar Jun 21 '23 12:06 danielsaidi

Yes Daniel, thank you very much!

I think I have noticed a pattern in issues I am having. Even though the context is updated, the AttributedString is not changed until the user actually inputs text. So changing the context, has no immediate affect on the AttributedString.

I noticed this fact when getting the font from the context. Even though the context is set to a specific font size, the AttributedString does not get this attribute added until characters are entered.

And to answer your question, no, I have not used UITextView directly before.

DavidAlvarezDev avatar Jun 25 '23 02:06 DavidAlvarezDev

Ok, great info - thanks! I will look into it :)

danielsaidi avatar Jun 29 '23 08:06 danielsaidi