Skip to content

Commit 84e8b92

Browse files
committed
feat: support string content in tabs
1 parent 71d2fef commit 84e8b92

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/editorFile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ export default class EditorFile {
244244
const content = tag("div", {
245245
className: "tab-page-content",
246246
});
247-
content.appendChild(options.content);
247+
248+
if (typeof options.content === "string") {
249+
content.innerHTML = options.content;
250+
} else {
251+
content.appendChild(options.content);
252+
}
248253

249254
// Append content container to shadow DOM
250255
shadow.appendChild(content);

0 commit comments

Comments
 (0)