livebook/assets/js/lib/notebook.js
Jonatan Kłosko 5476fd001d
Introduce a setup cell (#1075)
* Introduce a setup cell

* Don't collapse setup cell when dirty

* Collapse fresh setup cell when empty

* Reword collapsed setup cell text
2022-03-28 21:36:57 +02:00

13 lines
346 B
JavaScript

/**
* Checks if the given cell type is eligible for evaluation.
*/
export function isEvaluable(cellType) {
return ["code", "smart", "setup"].includes(cellType);
}
/**
* Checks if the given cell type has primary editable editor.
*/
export function isDirectlyEditable(cellType) {
return ["markdown", "code", "setup"].includes(cellType);
}