mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed html attributes not showing in design settings preview
no issue - by using `innerHTML` we were missing the lang and class attributes on the `<html>` element that are added by themes, breaking things like dark mode - switching to `outerHTML` includes the `<html>` element and is handled automatically by iframes when writing to the `contentWindow`
This commit is contained in:
parent
de5674ebd4
commit
7eda410dc3
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ export default class ThemeManagementService extends Service {
|
|||
stylesheet.innerHTML = `${originalCSS}\n\n${injectedCss}`;
|
||||
|
||||
// replace the iframe contents with the doctored preview html
|
||||
this.previewHtml = htmlDoc.documentElement.innerHTML;
|
||||
this.previewHtml = htmlDoc.documentElement.outerHTML;
|
||||
}
|
||||
|
||||
get previewData() {
|
||||
|
|
Loading…
Add table
Reference in a new issue