refactor: iframe block support in RecordFormBlockInitializers (#3541)

This commit is contained in:
katherinehhh 2024-02-21 16:53:10 +08:00 committed by GitHub
parent 90cdef8662
commit bdc90155c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,24 @@ export class IframeBlockPlugin extends Plugin {
title: '{{t("Iframe")}}', title: '{{t("Iframe")}}',
Component: 'IframeBlockInitializer', Component: 'IframeBlockInitializer',
}); });
const createFormBlockInitializers = this.app.schemaInitializerManager.get('CreateFormBlockInitializers');
createFormBlockInitializers?.add('otherBlocks.iframe', {
title: '{{t("Iframe")}}',
Component: 'IframeBlockInitializer',
});
const recordBlockInitializers = this.app.schemaInitializerManager.get('RecordBlockInitializers');
recordBlockInitializers?.add('otherBlocks.iframe', {
title: '{{t("Iframe")}}',
Component: 'IframeBlockInitializer',
});
const recordFormBlockInitializers = this.app.schemaInitializerManager.get('RecordFormBlockInitializers');
recordFormBlockInitializers?.add('otherBlocks.iframe', {
title: '{{t("Iframe")}}',
Component: 'IframeBlockInitializer',
});
} }
} }