Highlight

open class Highlight : Object

A Highlight object

  • Declaration

    Swift

    @objc
    open dynamic var bookId: String!
  • Declaration

    Swift

    @objc
    open dynamic var content: String!
  • Declaration

    Swift

    @objc
    open dynamic var contentPost: String!
  • Declaration

    Swift

    @objc
    open dynamic var contentPre: String!
  • Declaration

    Swift

    @objc
    open dynamic var date: Date!
  • Declaration

    Swift

    @objc
    open dynamic var highlightId: String!
  • Declaration

    Swift

    @objc
    open dynamic var page: Int
  • Declaration

    Swift

    @objc
    open dynamic var type: Int
  • Declaration

    Swift

    @objc
    open dynamic var startOffset: Int
  • Declaration

    Swift

    @objc
    open dynamic var endOffset: Int
  • Declaration

    Swift

    @objc
    open dynamic var noteForHighlight: String?
  • Declaration

    Swift

    override open class func primaryKey() -> String
  • Declaration

    Swift

    public struct MatchingHighlight
  • Match a highlight on string.

    Declaration

    Swift

    public static func matchHighlight(_ matchingHighlight: MatchingHighlight) -> Highlight?
  • Remove a Highlight from HTML by ID

    Declaration

    Swift

    @discardableResult
    public static func removeFromHTMLById(withinPage page: FolioReaderPage?, highlightId: String) -> String?

    Parameters

    page

    The page containing the HTML.

    highlightId

    The ID to be removed

    Return Value

    The removed id

  • Remove span tag before store the highlight, this span is added on JavaScript.

    Declaration

    Swift

    public static func removeSentenceSpam(_ text: String) -> String

    Parameters

    text

    Text to analise

    Return Value

    Striped text