cjwirth / RichEditorView

RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing.
BSD 3-Clause "New" or "Revised" License
1.9k stars 445 forks source link

use richEditorView as the cell of UICollectionView(Height and scrolling issue)? #196

Open VinothKuppanna opened 5 years ago

VinothKuppanna commented 5 years ago

I want to use lots of RichEditorView in my app to edit content html. So I decided to use RichEditorView in UICollectionViewCell. So all visible cells trying to load its html content. I want to get height of each RichEditorView content. So I added two params in RichEditorView class(row and section). While every cells load I set these params. I get content height from func richEditor(_ editor: RichEditorView, heightDidChange height: Int)

While getting height, I update height of UICollectionviewcell back from RichEditorView (editor.row and editor.section). But its given wrong html text and its height for wrong row and section.By default its load correct. While scrolling the collection view gets hanged and height gets collapsed.

Is it possible to get height of HTML content synchronously?

@cjwirth @ccwasden