Initial space mounting support
This commit is contained in:
@@ -459,6 +459,7 @@ export class Editor {
|
||||
await this.system.unloadAll();
|
||||
console.log("(Re)loading plugs");
|
||||
for (let pageInfo of this.space.listPlugs()) {
|
||||
console.log("Loading plug", pageInfo.name);
|
||||
let { text } = await this.space.readPage(pageInfo.name);
|
||||
await this.system.load(JSON.parse(text), createIFrameSandbox);
|
||||
}
|
||||
@@ -587,6 +588,7 @@ export class Editor {
|
||||
// console.log("Restoring selection state", pageState);
|
||||
editorView.dispatch({
|
||||
selection: pageState.selection,
|
||||
scrollIntoView: true,
|
||||
});
|
||||
editorView.scrollDOM.scrollTop = pageState!.scrollTop;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ function wrapLines(view: EditorView, wrapElements: WrapElement[]) {
|
||||
from,
|
||||
to,
|
||||
enter: ({ type, from, to }) => {
|
||||
const bodyText = doc.sliceString(from, to);
|
||||
for (let wrapElement of wrapElements) {
|
||||
if (type.name == wrapElement.selector) {
|
||||
if (wrapElement.nesting) {
|
||||
|
||||
Reference in New Issue
Block a user