add replaceCells to notebook edit builder, also refactor cell source to only be a string, not an array

This commit is contained in:
Johannes Rieken
2020-08-24 11:01:08 +02:00
parent f7a687ed42
commit 834a380d93
14 changed files with 231 additions and 217 deletions

View File

@@ -452,7 +452,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
if (data.cells.length) {
textModel.initialize(data!.cells);
} else {
const mainCell = textModel.createCellTextModel([''], textModel.languages.length ? textModel.languages[0] : '', CellKind.Code, [], undefined);
const mainCell = textModel.createCellTextModel('', textModel.languages.length ? textModel.languages[0] : '', CellKind.Code, [], undefined);
textModel.insertTemplateCell(mainCell);
}