OOCalendarEditRemarkViewController.swift 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // OOCalendarEditRemarkViewController.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2020/6/11.
  6. // Copyright © 2020 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. protocol ContentEditBackDelegate {
  10. func backEditContent(contentHtml:String)
  11. }
  12. class OOCalendarEditRemarkViewController: ZSSRichTextEditor {
  13. var contentHTML:String?
  14. var backDelegate:ContentEditBackDelegate?
  15. override func viewDidLoad() {
  16. super.viewDidLoad()
  17. //self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "保存", style: .plain, target: self, action: #selector(tapSave))
  18. self.navigationItem.title = "编辑内容"
  19. if let content = contentHTML {
  20. self.setHTML(content)
  21. }
  22. // Do any additional setup after loading the view.
  23. }
  24. @IBAction func save(_ sender: Any) {
  25. self.dismiss(animated: true) {
  26. ()-> Void in
  27. print("save.....")
  28. let dataDict = ["contentHtml" : self.getHTML()]
  29. NotificationCenter.default.post(name:Notification.Name(rawValue: "RegisterCompletionNotification"),object:nil,userInfo:dataDict)
  30. }
  31. }
  32. @IBAction func cancel(_ sender: Any) {
  33. self.dismiss(animated: true, completion: {print("cancel....")})
  34. }
  35. func tapSave(){
  36. print("dddd");
  37. }
  38. /*
  39. // MARK: - Navigation
  40. // In a storyboard-based application, you will often want to do a little preparation before navigation
  41. override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  42. // Get the new view controller using segue.destination.
  43. // Pass the selected object to the new view controller.
  44. }
  45. */
  46. }