From 01468713bd2de1f7a804a1cc22585006fc330d78 Mon Sep 17 00:00:00 2001 From: David Ruan Date: Sun, 29 May 2022 06:14:30 +0000 Subject: [PATCH] additonalUrl --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 4636d07..7b5f324 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,8 +62,12 @@ export default class CustomFramesPlugin extends Plugin { let style = styleMatch && styleMatch[1].trim(); style ||= "height: 600px;"; + let additionalUrlMatch = /additionalStyle:([^\n]+)/gi.exec(s); + let additionalUrl = additionalUrlMatch && additionalUrlMatch[1].trim(); + additionalUrl ||= ""; + let frame = new CustomFrame(this.settings, data); - e.appendChild(frame.create(style)); + e.appendChild(frame.create(style, additionalUrl)); }); }