     func layoutTextView() {
         let lineHeight = titleTextField.font!.lineHeight
         let offset: CGFloat = 15.0
-        let width: CGFloat = textView.frame.width - (offset * 2)
+        let width: CGFloat = richTextView.frame.width - (offset * 2)
         let height: CGFloat = lineHeight * 2.0
         titleTextField.frame = CGRect(x: offset, y: 0, width: width, height: height)
 
         separatorView.frame = CGRect(x: offset, y: titleTextField.frame.maxY, width: width, height: 1)
 
         let top: CGFloat = separatorView.frame.maxY + lineHeight
-        textView.textContainerInset = UIEdgeInsets(top: top, left: offset, bottom: lineHeight, right: offset)
+        richTextView.textContainerInset = UIEdgeInsets(top: top, left: offset, bottom: lineHeight, right: offset)
     }
 
 



    @IBAction func switchEditionMode() {
        editor.toggleHTML()
    }



        // lazy load the editor
        _ = editor

        view.addSubview(richTextView)

        richTextView.attributedText = self.getSampleHTML()

        configureConstraints()
        configureNavigationBar()
