From 88662ee4893b4f8c9b965102aed63008bd5593ce Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 21 Jul 2022 15:49:00 -0700 Subject: [PATCH] Code cleanups and comments --- common/util/iframe.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/common/util/iframe.ts b/common/util/iframe.ts index 024ab301..c7e32aa6 100644 --- a/common/util/iframe.ts +++ b/common/util/iframe.ts @@ -13,14 +13,13 @@ export interface IframeOptions { declare module '@tiptap/core' { interface Commands { iframe: { - /** - * Add an iframe - */ setIframe: (options: { src: string }) => ReturnType } } } +// These classes style the outer wrapper and the inner iframe; +// Adopted from css in https://github.com/ueberdosis/tiptap/blob/main/demos/src/Experiments/Embeds/Vue/index.vue const wrapperClasses = 'relative h-auto w-full overflow-hidden' const iframeClasses = 'absolute top-0 left-0 h-full w-full' @@ -58,11 +57,7 @@ export default Node.create({ }, parseHTML() { - return [ - { - tag: 'iframe', - }, - ] + return [{ tag: 'iframe' }] }, renderHTML({ HTMLAttributes }) {