Need a way to edit/set/reduce image size
photos from insertImage can be huge. Is there anyway to change/set the display size to 50% width etc.
Something like what Summernote is doing.
style="width: 50%"
Yeah, I agree, something like this should be in there. I'll see what I can whip up.
Sorry that I am super late on this, but you can always inject a viewport inside the meta tag of the html before setting it on the editor. That's how I solved this exact problem without losing quality of the image.
Hello guys, can anyone explain the solution in detail?
Got the solution but we need to modify some of the files:

Any update on this?
@markchous Can you please explain more on your solution? Thanks!
can you please share modified code
You can do something like:
func insertImage(editor: RichEditorView, src: String, width: Int? = nil, height: Int? = nil, alt: String = "") {
let finalWidth = width == nil ? "auto" : "\(width!)px"
let finalHeight = height == nil ? "auto" : "\(height!)px"
editor.html += "<img src=\"\(src)\" alt=\"\(alt)\" style=\"width: \(finalWidth); height: \(finalHeight); max-width: 100%;\" /><br />"
editor.runJS("RE.focus()") // Move cursor to a newly added line
}
Note that I've used the max-width constraint to not to overflow the max width of a web view, you may add/remove it on your own (or add a max-height as well)