From 2f899fe6328dbc9fd443e4e453abd259573d8c3a Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Fri, 17 Aug 2018 16:09:23 +0200 Subject: [PATCH] add todo bullet --- AddPageViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AddPageViewController.swift b/AddPageViewController.swift index 189cb3d..7d29b56 100644 --- a/AddPageViewController.swift +++ b/AddPageViewController.swift @@ -155,6 +155,13 @@ class AddPageViewController: UIViewController, UITextViewDelegate, UIImagePicker self.textView.insertText("*") } }, for: .touchUpInside), + RFToolbarButton(title: "- [ ]", andEventHandler: { + if (self.textView.selectedRange.length > 0) { + self.textView.wrapSelectedRange(with: "- [ ]") + } else { + self.textView.insertText("- [ ] ") + } + }, for: .touchUpInside), RFToolbarButton(title: "Indent", andEventHandler: { self.textView.insertText(" ") }, for: .touchUpInside),