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
Copy file name to clipboardExpand all lines: README.md
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Basic code to make it work:
30
30
31
31
32
32
If you need to sync your model with ParagraphTextStorage content, set the paragraphDelegate to adopt the ParagraphTextStorageDelegate protocol.
33
-
It's just two methods:
33
+
It's simple:
34
34
35
35
var presentedParagraphs: [AttributedRepresentable] {
36
36
yourModel.paragraphs
@@ -58,9 +58,7 @@ Finally, set the paragraphDelegate property of the ParagraphTextStorage instance
58
58
That's all you need to implement to make things work.
59
59
60
60
### Important changes in version 1.2:
61
-
This version introduces the AttributedRepresentable protocol that defines the attributed string representation of any model. In our case we use this protocol to create even stronger syncronization between a delegate and ParagraphTextStorage.
62
-
63
-
Updated delegate protocol with new requrements of the model which now should adopt AttributedRepresentable protocol allows ParagraphTextKit to load the initial state of your model into its underlying text storage property.
61
+
Updated delegate protocol with new requrements of the model which now should be able to present its paragraphs as array of NSAttributedStrings. That allows ParagraphTextKit to load the initial state of your model into its underlying text storage property.
64
62
65
63
In previous versions ParagraphTextKit was able to do its job only if your initial text model was empty. If you've already had some paragraphs in your model then you'd need to set ParagraphTextStorage content by yourself right after the initialization. Now ParagraphTextKit takes that onto itself completely.
0 commit comments