Skip to content

Commit 6089e50

Browse files
author
p01
committed
Use the fallback template as iframe's fallback for the font preview
1 parent 9ba6b5b commit 6089e50

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/resource-manager/resource_templates.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ window.templates.resource_detail || (window.templates.resource_detail = new func
405405
this.font = function(resource)
406406
{
407407
var font_family_name = "font" + resource.uid;
408-
var style_sheet = "@font-face { font-family: \"" + font_family_name + "\";" +
408+
var style_sheet = "@font-face { font-family: \"" + font_family_name + "\";" +
409409
"src: url(\"" + resource.data.content.stringData + "\"); }";
410410
var inline_style = "font-size: 64px; font-family: " + font_family_name + ";" +
411411
"white-space: pre; word-break: break-all; " +
@@ -414,11 +414,7 @@ window.templates.resource_detail || (window.templates.resource_detail = new func
414414

415415
return(
416416
["object",
417-
["div",
418-
sample_string,
419-
["style", style_sheet],
420-
"style", inline_style,
421-
],
417+
// this.fallback(resource),
422418
"data", "data:text/html;base64," +
423419
btoa("<!doctype html><style>" + style_sheet + "</style>" +
424420
"<div contenteditable=\"true\" style=\"" + inline_style + "\">" + sample_string),

0 commit comments

Comments
 (0)