Editor.js 408 B

12345678910111213141516
  1. import GGEditorCore from '@gg-editor-core/bundle';
  2. import { EVENT_BEFORE_ADD_PAGE } from '@common/constants';
  3. import track from '@helpers/track';
  4. import { uniqueId } from '@utils';
  5. export default class Editor extends GGEditorCore {
  6. constructor(options) {
  7. super(options);
  8. this.id = uniqueId();
  9. this.on(EVENT_BEFORE_ADD_PAGE, ({ className }) => {
  10. track({ c1: className });
  11. });
  12. }
  13. }