Skip to content

Commit

Permalink
update links
Browse files Browse the repository at this point in the history
  • Loading branch information
cbess committed Oct 30, 2020
1 parent 7472037 commit 9502828
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ extension ViewController: RichEditorToolbarDelegate, UIColorPickerViewController
}

func richEditorToolbarInsertImage(_ toolbar: RichEditorToolbar) {
toolbar.editor?.insertImage("https://gravatar.com/avatar/696cf5da599733261059de06c4d1fe22", alt: "Gravatar")
toolbar.editor?.insertImage("https://avatars2.githubusercontent.com/u/10981?s=60", alt: "Gravatar")
}

func richEditorToolbarInsertLink(_ toolbar: RichEditorToolbar) {
// Can only add links to selected text, so make sure there is a range selection first
// if let hasSelection = toolbar.editor?.rangeSelectionExists(), hasSelection {
// toolbar.editor?.insertLink("http://github.com/cjwirth/RichEditorView", title: "Github Link")
// toolbar.editor?.insertLink("https://github.com/cbess/RichEditorView", title: "GitHub Link")
// }
}

Expand All @@ -127,7 +127,6 @@ extension ViewController: RichEditorToolbarDelegate, UIColorPickerViewController
}

if isTextColor {

toolbar.editor?.setTextColor(color)
} else {
toolbar.editor?.setTextBackgroundColor(color)
Expand Down

0 comments on commit 9502828

Please sign in to comment.