You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @VIJAYARAJSVR , just note that I didn't forget about this. I am actively implementing this and I ran into some issues with the current implementation. I want to give you some background:
As you can see, bulleted list were super complicated to implement with TextKit 1, best solution to do this is to create custom NSLayoutManager and NSTextContainer in order to draw bullet points with some offset. I have tried my best to make it work as smooth as possible but I ran into so many issues that I can't actually even name.
With TextKit 2, it is possible to create bullet list on go by adding textList array to NSMutableParagraphStyle as follows:
let list = NSTextList(markerFormat: .decimal, options: 0)
let listLevel1Style = NSMutableParagraphStyle()
listLevel1Style.textLists = [ list ]
setRichTextAttribute(.paragraphStyle, to: listLevel1Style)
This will work, but only iOS 16+ (which is the project, that's cool) when using TextKit2... However there is another issue with the project, that custom text alignment setting collides with this a bit.
In order to fix paragraphs, we needed to use textStorage instead of simply just adding paragraph attribute to the text alone since this introduced buggy behaviour.
See #145 and #147 for further understanding of the implementation.
Thank you very much for providing the "RichTextKit" package. It helps my project.
Please kindly add a Hyperlink and bulleted list. Also, kindly take this as a request.
The text was updated successfully, but these errors were encountered: