     }()
 
     fileprivate(set) lazy var htmlTextView: UITextView = {
-        let textView = UITextView()
+        let storage = HTMLStorage(defaultFont: Constants.defaultContentFont)
+        let layoutManager = NSLayoutManager()
+        let container = NSTextContainer()
+
+        storage.addLayoutManager(layoutManager)
+        layoutManager.addTextContainer(container)
+
+        let textView = UITextView(frame: .zero, textContainer: container)
 
         let toolbar = self.createToolbar(htmlMode: true)
 

            switch editingMode {
            case .html:
                htmlTextView.text = richTextView.getHTML()
                htmlTextView.textStorage.colorizeHTML(font: Constants.defaultContentFont)
                htmlTextView.becomeFirstResponder()
            case .richText:
                richTextView.setHTML(htmlTextView.text)

        case titleTextField:
            updateTitleHeight()
            updateTitlePlaceholderVisibility()
        default:
            break
        }
