mirror of
https://github.com/Ellpeck/ObsidianCustomFrames.git
synced 2024-05-17 16:18:43 +02:00
add additionalUrl parameter
This commit is contained in:
parent
5a0597d930
commit
d4a262d4f4
1274
package-lock.json
generated
1274
package-lock.json
generated
File diff suppressed because it is too large
Load diff
11
src/frame.ts
11
src/frame.ts
|
@ -12,7 +12,7 @@ export class CustomFrame {
|
|||
this.data = data;
|
||||
}
|
||||
|
||||
public create(additionalStyle: string = undefined): any {
|
||||
public create(additionalStyle: string = undefined,additionalUrl:string = undefined): any {
|
||||
let style = `padding: ${this.settings.padding}px;`;
|
||||
if (additionalStyle)
|
||||
style += additionalStyle;
|
||||
|
@ -32,7 +32,14 @@ export class CustomFrame {
|
|||
}
|
||||
this.frame.addClass("custom-frames-frame");
|
||||
this.frame.setAttribute("style", style);
|
||||
this.frame.setAttribute("src", this.data.url);
|
||||
if (additionalUrl) {
|
||||
this.frame.setAttribute("src", this.data.url+additionalUrl);
|
||||
|
||||
}
|
||||
else {
|
||||
this.frame.setAttribute("src", this.data.url);
|
||||
}
|
||||
|
||||
return this.frame;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue