|
|
@@ -6,6 +6,15 @@ import * as entities from 'entities';
|
|
|
import * as toastr from 'toastr';
|
|
|
import { toastError } from '../util/apiNotification';
|
|
|
|
|
|
+import {
|
|
|
+ DetachCodeBlockInterceptor,
|
|
|
+ RestoreCodeBlockInterceptor,
|
|
|
+} from '../util/interceptor/detach-code-blocks';
|
|
|
+
|
|
|
+import {
|
|
|
+ DrawioInterceptor,
|
|
|
+} from '../util/interceptor/drawio-interceptor';
|
|
|
+
|
|
|
const logger = loggerFactory('growi:services:PageContainer');
|
|
|
const scrollThresForSticky = 0;
|
|
|
const scrollThresForCompact = 30;
|
|
|
@@ -69,6 +78,11 @@ export default class PageContainer extends Container {
|
|
|
isSubnavCompact: false,
|
|
|
};
|
|
|
|
|
|
+ const { interceptorManager } = this.appContainer;
|
|
|
+ interceptorManager.addInterceptor(new DetachCodeBlockInterceptor(appContainer), 10); // process as soon as possible
|
|
|
+ interceptorManager.addInterceptor(new DrawioInterceptor(appContainer), 20);
|
|
|
+ interceptorManager.addInterceptor(new RestoreCodeBlockInterceptor(appContainer), 900); // process as late as possible
|
|
|
+
|
|
|
this.initStateMarkdown();
|
|
|
this.initStateOthers();
|
|
|
|