From 157faac6a3c8a7c2347baf78e1796ff0aa3e0312 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 7 Sep 2020 15:27:34 -0400 Subject: fixed childLayoutString templates whch broke somewhere along the way. --- src/client/views/nodes/DocumentContentsView.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/DocumentContentsView.tsx') diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx index 1b2070c0f..90fc5dc64 100644 --- a/src/client/views/nodes/DocumentContentsView.tsx +++ b/src/client/views/nodes/DocumentContentsView.tsx @@ -64,7 +64,19 @@ interface HTMLtagProps { onClick?: ScriptField; onInput?: ScriptField; } -//"{this.title}"@observer + +//" {this.title}" +//" +// +// +// {this.title} +// +// " @observer export class HTMLtag extends React.Component { click = (e: React.MouseEvent) => { @@ -170,10 +182,10 @@ export class DocumentContentsView extends React.Component { - const splits = layoutFrame.split(`func=`); + const splits = layoutFrame.split(`${func}=`); if (splits.length > 1) { const code = XRegExp.matchRecursive(splits[1], "{", "}", "", { valueNames: ["between", "left", "match", "right", "between"] }); - layoutFrame = splits[0] + ` ${func}={props.onClick} ` + splits[1].substring(code[1].end + 1); + layoutFrame = splits[0] + ` ${func}={props.${func}} ` + splits[1].substring(code[1].end + 1); return ScriptField.MakeScript(code[1].value, { this: Doc.name, self: Doc.name, value: "string" }); } return undefined; -- cgit v1.2.3-70-g09d2