diff --git a/README.md b/README.md index 7d00a27e..b2eccf78 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Proton + Proton logo + > **Note:** While Proton is already a very powerful and flexible framework, it is still in early stages of development. The APIs and public interfaces are still undergoing revisions and may introduce breaking changes with every version bump before reaching stable version 1.0.0. Proton is a simple library that allows you to extend the behavior of a textview to add rich content that you always wanted. It provides simple API that allows you to extend the textView to include complex content like nested textViews or for that matter, any other UIView. In the simplest terms - It's what you always wanted `UITextView` to be. @@ -156,7 +158,7 @@ Let's take an example of a `TextPanel` and see how that can be created in the `E if key == .backspace, range == .zero, panel.editor.attributedText.string.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { removeFromContainer() handled = true - } + } } } ``` @@ -164,5 +166,30 @@ Let's take an example of a `TextPanel` and see how that can be created in the `E Checkout the complete code in the ExamplesApp. +## Example usages +1. Changing text as it is typed using custom `TextProcessor`: + + Markup text processor +2. Adding attributes as it is typed using custom `TextProcessor`: + + Mentions text processor +3. Nested editors + + Nested editors +4. Panel from existing text: + + Panel from text +5. Relaying attributes to editor contained in an attachment: + + Relay attributes +6. Highlighting using custom command in Renderer: + + Highlight in Renderer +7. Find text and scroll in Renderer: + + Find in Renderer + + ## Questions and feature requests -Feel free to create issues in github should you have any questions or feature requests. While Proton is created as a side project, I'll endeavour to respond to your issues at earliet possible. + +Feel free to create issues in github should you have any questions or feature requests. While Proton is created as a side project, I'll endeavour to respond to your issues at earliest possible. diff --git a/exampleImages/attributes-highlighjt.gif b/exampleImages/attributes-highlighjt.gif new file mode 100644 index 00000000..77da9575 Binary files /dev/null and b/exampleImages/attributes-highlighjt.gif differ diff --git a/exampleImages/markup.gif b/exampleImages/markup.gif new file mode 100644 index 00000000..6080918a Binary files /dev/null and b/exampleImages/markup.gif differ diff --git a/exampleImages/mentions.gif b/exampleImages/mentions.gif new file mode 100644 index 00000000..a8498944 Binary files /dev/null and b/exampleImages/mentions.gif differ diff --git a/exampleImages/nested-panels.gif b/exampleImages/nested-panels.gif new file mode 100644 index 00000000..77df55a7 Binary files /dev/null and b/exampleImages/nested-panels.gif differ diff --git a/exampleImages/panel-from-text.gif b/exampleImages/panel-from-text.gif new file mode 100644 index 00000000..a3d6d6ac Binary files /dev/null and b/exampleImages/panel-from-text.gif differ diff --git a/exampleImages/relay-attributes.gif b/exampleImages/relay-attributes.gif new file mode 100644 index 00000000..7b785b65 Binary files /dev/null and b/exampleImages/relay-attributes.gif differ diff --git a/exampleImages/renderer-find.gif b/exampleImages/renderer-find.gif new file mode 100644 index 00000000..1adc4dbd Binary files /dev/null and b/exampleImages/renderer-find.gif differ diff --git a/exampleImages/renderer-highlight.gif b/exampleImages/renderer-highlight.gif new file mode 100644 index 00000000..38428f51 Binary files /dev/null and b/exampleImages/renderer-highlight.gif differ diff --git a/logo.png b/logo.png new file mode 100644 index 00000000..075a428d Binary files /dev/null and b/logo.png differ