src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.ts/MarkupCellViewModel/constructor
class MarkupCellViewModel:	constructor(
		viewType: string,
		model: NotebookCellTextModel,
		initialNotebookLayoutInfo: NotebookLayoutInfo | null,
		readonly foldingDelegate: EditorFoldingStateDelegate,
		readonly viewContext: ViewContext,
		@IConfigurationService configurationService: IConfigurationService,
		@ITextModelService textModelService: ITextModelService,
		@IInstantiationService instantiationService: IInstantiationService,
	) {
		super(viewType, model, UUID.generateUuid(), viewContext, configurationService, textModelService);

		this._mdRenderer = this._register(instantiationService.createInstance(MarkdownRenderer, { baseUrl: dirname(model.uri) }));

		const { bottomToolbarGap } = this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);

		this._layoutInfo = {
			editorHeight: 0,
			previewHeight: 0,
			fontInfo: initialNotebookLayoutInfo?.fontInfo || null,
			editorWidth: initialNotebookLayoutInfo?.width
				? this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(initialNotebookLayoutInfo.width)
				: 0,
			bottomToolbarOffset: bottomToolbarGap,
			totalHeight: 0
		};

		this._register(this.onDidChangeState(e => {
			this.viewContext.eventDispatcher.emit([new NotebookCellStateChangedEvent(e, this)]);
		}));

		this._register(model.onDidChangeMetadata(e => {
			if (this.metadata.inputCollapsed) {
				this._onDidHideInput.fire();
			}
		}));

		this._register(this.viewContext.notebookOptions.onDidChangeOptions(e => {
			if (e.cellStatusBarVisibility || e.insertToolbarPosition || e.cellToolbarLocation) {
				const layoutConfiguration = this.viewContext.notebookOptions.getLayoutConfiguration();
				const { bottomToolbarGap } = this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);

				if (this.getEditState() === CellEditState.Editing) {
					this._updateTotalHeight(this._editorHeight
						+ layoutConfiguration.markdownCellTopMargin
						+ layoutConfiguration.markdownCellBottomMargin
						+ bottomToolbarGap
						+ this.viewContext.notebookOptions.computeStatusBarHeight());
				} else {
					this._updateTotalHeight(this._previewHeight + bottomToolbarGap);
				}
			}
		}));
	}