Skip to content

EurekaCommunity/RichTextRow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

029e045 · Aug 27, 2021

History

22 Commits
Apr 24, 2018
Jan 19, 2019
Aug 27, 2021
Jan 19, 2019
Jan 19, 2019
Aug 27, 2021
May 4, 2017
Aug 27, 2021
May 9, 2017
Aug 27, 2021
Aug 27, 2021
Jun 19, 2020
Aug 27, 2021

Repository files navigation

Carthage compatible CocoaPods compatible License: MIT

Introduction

RichTextRow is a Eureka custom row that allows us to display and edit html. This row is using a WKWebView to render a div containing contenteditable=true attribute. Editing supports bold, italic and underline style, selectable from the long press menu.

Usage

import Eureka
import RichTextRow

class ViewController: FormViewController {

    let html = "<div>This is a div</div>"

    override func viewDidLoad() {
        super.viewDidLoad()

        form +++ Section()
            <<< RichTextRow() { row in
                row.title = "Placeholder"
                row.value = html
            }
    }
}

Requirements

  • iOS 9.0+
  • Xcode 9.0+
  • Eureka 5.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

To install RichTextRow, simply add the following line to your Podfile:

pod 'RichTextRow', '~> 1.0'

Carthage

Carthage is a simple, decentralized dependency manager for Cocoa.

To install RichTextRow, simply add the following line to your Cartfile:

github "EurekaCommunity/RichTextRow" ~> 1.0

Customization

If you need to use custom CSS styles you can add them to RichTextEditor.html file.

Author