feat: Forge opens in editor modal instead of new tab
Forge button now reuses the existing editor-modal with an iframe. Same position as the Edit/CodeMirror modal. On close, the forge iframe is removed and the current file is refreshed (picks up changes saved by the POC's auto-save). Updated both frontend/js/viewer.js and frontend/app.js.
This commit is contained in:
@@ -459,6 +459,12 @@ function closeEditor() {
|
||||
state.editorView = null;
|
||||
}
|
||||
state.fallbackEditorEl = null;
|
||||
// Remove forge iframe if present + refresh current file
|
||||
var forgeFrame = document.getElementById("forge-iframe");
|
||||
if (forgeFrame) {
|
||||
forgeFrame.remove();
|
||||
if (state.currentVault && state.currentPath) openFile(state.currentVault, state.currentPath);
|
||||
}
|
||||
state.editorVault = null;
|
||||
state.editorPath = null;
|
||||
// Refresh file content if we're viewing the edited file
|
||||
|
||||
Reference in New Issue
Block a user