Skip to content

Commit

Permalink
Updated readme with example images and logo (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeep authored Apr 7, 2020
1 parent 05a1e47 commit b32ec23
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Proton

<img src="/logo.png" width="80%" alt="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.
Expand Down Expand Up @@ -156,13 +158,38 @@ 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
}
}
}
}
```
In the code above, `PanelViewDelegate` is acting as a passthrough for `EditorViewDelegate` for the `Editor` inside the `PanelView`.

Checkout the complete code in the ExamplesApp.

## Example usages
1. Changing text as it is typed using custom `TextProcessor`:

<img src="/exampleImages/markup.gif" width="50%" alt="Markup text processor"/>
2. Adding attributes as it is typed using custom `TextProcessor`:

<img src="/exampleImages/mentions.gif" width="50%" alt="Mentions text processor"/>
3. Nested editors

<img src="/exampleImages/nested-panels.gif" width="50%" alt="Nested editors"/>
4. Panel from existing text:

<img src="/exampleImages/panel-from-text.gif" width="50%" alt="Panel from text"/>
5. Relaying attributes to editor contained in an attachment:

<img src="/exampleImages/relay-attributes.gif" width="50%" alt="Relay attributes"/>
6. Highlighting using custom command in Renderer:

<img src="/exampleImages/renderer-highlight.gif" width="50%" alt="Highlight in Renderer"/>
7. Find text and scroll in Renderer:

<img src="/exampleImages/renderer-find.gif" width="50%" alt="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.
Binary file added exampleImages/attributes-highlighjt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/markup.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/mentions.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/nested-panels.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/panel-from-text.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/relay-attributes.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/renderer-find.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added exampleImages/renderer-highlight.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b32ec23

Please sign in to comment.