Code widget refactor

This commit is contained in:
Zef Hemel
2023-10-31 10:33:38 +01:00
parent 4ef857acf4
commit d8318c4ad7
13 changed files with 64 additions and 32 deletions
+6 -3
View File
@@ -23,9 +23,12 @@ export class CodeWidgetHook implements Hook<CodeWidgetT> {
if (!functionDef.codeWidget) {
continue;
}
this.codeWidgetCallbacks.set(functionDef.codeWidget, (bodyText) => {
return plug.invoke(name, [bodyText]);
});
this.codeWidgetCallbacks.set(
functionDef.codeWidget,
(bodyText, pageName) => {
return plug.invoke(name, [bodyText, pageName]);
},
);
}
}
}