Anatoly Pulyaevskiy 4 anos atrás
pai
commit
cd5ac39599

+ 1
- 10
README.md Ver arquivo

@@ -7,15 +7,6 @@ request or found a bug, please file it at the [issue tracker][].
7 7
 
8 8
 [issue tracker]: https://github.com/memspace/zefyr/issues
9 9
 
10
-### Documentation
11
-
12
-* [Quick Start](doc/quick-start.md)
13
-* [Data Format and Document Model](doc/concepts/data-and-document.md)
14
-* [Style attributes](doc/concepts/attributes.md)
15
-* [Heuristic rules](doc/concepts/heuristics.md)
16
-* [Images](doc/images.md)
17
-* [FAQ](doc/faq.md)
18
-
19 10
 ## Clean and modern look
20 11
 
21 12
 Zefyr's rich text editor is built with simplicity and flexibility in
@@ -45,7 +36,7 @@ collaborative editing use cases or whenever there is a need for
45 36
 conflict-free resolution of changes.
46 37
 
47 38
 > Zefyr editor uses Quill.js **Delta** as underlying data format. Read
48
-> more about Zefyr and Deltas in our [documentation](doc/data-and-document.md).
39
+> more about Zefyr and Deltas in our [documentation](doc/concepts/data-and-document.md).
49 40
 > Make sure to checkout [official documentation][delta] for Delta format
50 41
 > as well.
51 42
 

+ 1
- 1
doc/concepts/attributes.md Ver arquivo

@@ -1,7 +1,7 @@
1 1
 ## Style Attributes
2 2
 
3 3
 > If you haven't yet, read introduction to Zefyr document model called
4
-> Notus [here](data-and-document.md);
4
+> Notus [here](data-and-document.md).
5 5
 
6 6
 Style attributes in Notus documents are simple key-value pairs, where
7 7
 keys identify the attribute and value describes the style applied, for

+ 1
- 1
doc/concepts/data-and-document.md Ver arquivo

@@ -18,7 +18,7 @@ essentially JSON, and is human readable.
18 18
 [Delta]: https://quilljs.com/docs/delta/
19 19
 [ot]: https://en.wikipedia.org/wiki/Operational_transformation
20 20
 [github-delta]: https://github.com/quilljs/delta
21
-[pub-delta]: https://pub.dartlang.com/packages/quill_delta
21
+[pub-delta]: https://pub.dev/packages/quill_delta
22 22
 
23 23
 ### Deltas quick start
24 24
 

+ 8
- 9
doc/concepts/heuristics.md Ver arquivo

@@ -11,15 +11,13 @@ a new list item when user presses `Enter` key.
11 11
 In Notus (document model used by Zefyr editor), such rules are called
12 12
 *heuristic rules*. There are two main purposes for heuristic rules:
13 13
 
14
-1. User experience: rules like above-mentioned autoformatting of links
15
-   are here to make editing a user friendly process.
16
-2. Semantics preservation: this is mostly invisible for the user but
17
-  is very important nevertheless. There is a set of rules to make sure
18
-  that a document change conforms to the data format and model
19
-  semantics.
14
+1. User experience: rules like above-mentioned autoformatting of links are here to make editing a user friendly process.
15
+2. Semantics preservation: this is mostly invisible for the user but is very important nevertheless. There is a set of rules to make sure that a document change conforms to the data format and model semantics.
20 16
 
21 17
 Let's cover the second item in more detail.
22 18
 
19
+### Example heuristic rule
20
+
23 21
 Say, a user is editing following document (cursor position is indicated
24 22
 by pipe `|` character):
25 23
 
@@ -39,7 +37,8 @@ var change = doc.format(
39 37
 ```
40 38
 
41 39
 If we try to apply this change as-is it would have no effect or, more
42
-likely, result in an `AssertionError`. This is why all methods in
40
+likely, result in an `AssertionError` because we are trying to apply line style
41
+to a character in the middle of a line. This is why all methods in
43 42
 `NotusDocument` have an extra step which applies heuristic rules to
44 43
 the change (there is one method which skips this step, `compose`,
45 44
 read more on it later) before actually composing it.
@@ -62,13 +61,13 @@ what user intended to do.
62 61
 There are more similar scenarios which are covered by heuristic rules
63 62
 to ensure consistency with the document model and provide better UX.
64 63
 
65
-### `NotusDocument.compose()` and skipping heuristic rules.
64
+### `NotusDocument.compose()` and skipping heuristic rules
66 65
 
67 66
 The `compose()` method is the only method which skips the step of
68 67
 applying heuristic rules and therefore **should be used with great
69 68
 care** as it can result in corrupted document state.
70 69
 
71
-Use this method when you sure that the change you are about to compose
70
+Use this method when you are sure that the change you are about to compose
72 71
 conforms to the document model and data format semantics.
73 72
 
74 73
 This method exists mostly to enable following use cases:

+ 1
- 1
doc/faq.md Ver arquivo

@@ -1,6 +1,6 @@
1 1
 ## Frequently asked questions
2 2
 
3
-### Are Notus documents compatible with Quill documents?
3
+### Q: Are Notus documents compatible with Quill documents?
4 4
 
5 5
 Short answer is no. Even though Notus uses Quill Delta as underlying
6 6
 representation for its documents there are at least differences in

+ 8
- 7
doc/quick-start.md Ver arquivo

@@ -1,10 +1,11 @@
1 1
 ## Quick Start
2 2
 
3
-Zefyr project is split in two main packages:
3
+Zefyr project consists of two packages:
4 4
 
5
-1. `zefyr` - Flutter package which provides the UI part
6
-2. `notus` - platform-agnostic package which provides document model
7
-   used by `zefyr` package.
5
+1. [zefyr](https://pub.dev/packages/zefyr) - Flutter package which provides
6
+   the UI part.
7
+2. [notus](https://pub.dev/packages/notus) - platform-agnostic package which
8
+   provides document model used in Zefyr editor.
8 9
 
9 10
 ### Installation
10 11
 
@@ -25,7 +26,7 @@ There are 4 main objects you would normally interact with in your code:
25 26
 * `NotusDocument`, represents a rich text document and provides
26 27
   high-level methods for manipulating the document's state, like
27 28
   inserting, deleting and formatting of text.
28
-  Read [documentation][data_and_docs] for more details on Notus
29
+  Read [documentation](concepts/data-and-document.md) for more details on Notus
29 30
   document model and data format.
30 31
 * `ZefyrEditor`, a Flutter widget responsible for rendering of rich text
31 32
   on the screen and reacting to user actions.
@@ -73,5 +74,5 @@ class MyWidgetState extends State<MyWidget> {
73 74
 }
74 75
 ```
75 76
 
76
-In following sections you will learn more about document
77
-model, Deltas, attributes and other aspects of the editor.
77
+This above is required minimum to include Zefyr in your Flutter app and start
78
+writing some rich text.