This commit is contained in:
Rizky 2024-01-18 18:42:10 +08:00
parent 7937a1d772
commit 065f389da0
1 changed files with 3 additions and 4 deletions

View File

@ -287,10 +287,9 @@ export const EdScriptMonaco: FC<{}> = () => {
{ css: "scss", js: "typescript", html: "html" }[p.ui.popup.script.mode]
}
onChange={(value) => {
return;
const stype = p.ui.popup.script.type;
if ((value || "").includes("/** SOURCE START **/")) {
const valparts = (value || "").split("/** SOURCE START **/\n");
if ((value || "").includes(IMPORT_SEPARATOR)) {
const valparts = (value || "").split(IMPORT_SEPARATOR + "\n");
if (valparts.length === 2) local.value = valparts[1];
if (
stype === "prop-instance" &&
@ -302,7 +301,7 @@ export const EdScriptMonaco: FC<{}> = () => {
`export const ${p.ui.popup.script.prop_name} = `.length
);
}
} else {
} else {
local.value = value || "";
}
local.render();