     private func embedNavigationController() {
         addChild(embeddedNavigationController)
         embeddedNavigationController.view.frame = containerView.frame
+        assert(containerView.subviews.isEmpty)
         containerView.addSubview(embeddedNavigationController.view)
         embeddedNavigationController.didMove(toParent: self)
     }

        case textStyle
    }

    var inputViewType = InputViewType.textFormatting

    private var theme = Theme.standard

    private lazy var embeddedNavigationController: UINavigationController = {
        let rootViewControllerType: (UIViewController & Themeable & TextFormattingProviding).Type

        if inputViewType == .textFormatting {
            rootViewControllerType = TextFormattingTableViewController.self
        } else {
            rootViewControllerType = TextStyleFormattingTableViewController.self
        }

        let storyboardName = "TextFormatting"
        var rootViewController = rootViewControllerType.wmf_viewControllerFromStoryboardNamed(storyboardName)
        rootViewController.delegate = delegate
        rootViewController.apply(theme: theme)

        let navigationController = UINavigationController(rootViewController: rootViewController)

}

class TextFormattingInputViewController: UIInputViewController {
    private let storyboardName = "TextFormatting"
    @IBOutlet weak var containerView: UIView!
    weak var delegate: TextFormattingDelegate?

    enum InputViewType {
