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
-
Save a Highlight with completion block
Declaration
Swift
public func persist(withConfiguration readerConfig: FolioReaderConfig, completion: Completion? = nil)Parameters
readerConfigCurrent folio reader configuration.
completionCompletion block.
-
Remove a Highlight
Declaration
Swift
public func remove(withConfiguration readerConfig: FolioReaderConfig)Parameters
readerConfigCurrent folio reader configuration.
-
Remove a Highlight by ID
Declaration
Swift
public static func removeById(withConfiguration readerConfig: FolioReaderConfig, highlightId: String)Parameters
readerConfigCurrent folio reader configuration.
highlightIdThe ID to be removed
-
Return a Highlight by ID
Declaration
Swift
public static func getById(withConfiguration readerConfig: FolioReaderConfig, highlightId: String) -> Highlight?Return Value
Return a Highlight
-
Update a Highlight by ID
Declaration
Swift
public static func updateById(withConfiguration readerConfig: FolioReaderConfig, highlightId: String, type: HighlightStyle)Parameters
readerConfigCurrent folio reader configuration.
highlightIdThe ID to be removed
typeThe
HighlightStyle -
Return a list of Highlights with a given ID
Declaration
Swift
public static func allByBookId(withConfiguration readerConfig: FolioReaderConfig, bookId: String, andPage page: NSNumber? = nil) -> [Highlight]Parameters
readerConfigCurrent folio reader configuration.
bookIdBook ID
pagePage number
Return Value
Return a list of Highlights
-
Return all Highlights
Declaration
Swift
public static func all(withConfiguration readerConfig: FolioReaderConfig) -> [Highlight]Parameters
readerConfig- readerConfig: Current folio reader configuration.
Return Value
Return all Highlights
-
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
pageThe page containing the HTML.
highlightIdThe 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) -> StringParameters
textText to analise
Return Value
Striped text
View on GitHub
Install in Dash
Highlight Class Reference