From b04fd890e6fdd5a0670d6f60caa2db91b0213580 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 6 Dec 2024 11:28:43 +0100 Subject: [PATCH 01/13] make config not get called until model is loaded --- app/controllers/agendapoints/edit.js | 28 +++++++++++++++++++--------- app/services/editor/agendapoint.js | 5 +++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index 37d0a7396..9cfd6ba4f 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -32,18 +32,28 @@ export default class AgendapointsEditController extends Controller { SnippetInsert = SnippetInsertRdfaComponent; - config = this.agendapointEditor.config; + constructor(...args) { + super(...args); + } - nodeViews = this.agendapointEditor.nodeViews; + get config() { + return this.agendapointEditor.config; + } - citationPlugin = this.agendapointEditor.citationPlugin; + get nodeViews() { + return this.agendapointEditor.nodeViews; + } - constructor(...args) { - super(...args); - const { schema, plugins } = - this.agendapointEditor.getSchemaAndPlugins(false); - this.schema = schema; - this.plugins = plugins; + get citationPlugin() { + return this.agendapointEditor.citationPlugin; + } + + get schema() { + return this.agendapointEditor.getSchemaAndPlugins(false).schema; + } + + get plugins() { + return this.agendapointEditor.getSchemaAndPlugins(false).plugins; } get dirty() { diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index d6e4303ad..050911b79 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -126,8 +126,9 @@ export default class AgendapointEditorService extends Service { @service intl; @service currentSession; - citationPlugin = citationPlugin(this.config.citation); - + get citationPlugin() { + return citationPlugin(this.config.citation); + } get config() { const classificatie = this.currentSession.classificatie; const municipality = this.defaultMunicipality; From 576e03a2d7e0a9589e08f001a1fb62620aa71bc6 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 6 Dec 2024 12:17:26 +0100 Subject: [PATCH 02/13] separate schema and plugins --- app/controllers/agendapoints/edit.js | 4 ++-- app/services/editor/agendapoint.js | 26 ++++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index 9cfd6ba4f..07a0e555c 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -49,11 +49,11 @@ export default class AgendapointsEditController extends Controller { } get schema() { - return this.agendapointEditor.getSchemaAndPlugins(false).schema; + return this.agendapointEditor.schema; } get plugins() { - return this.agendapointEditor.getSchemaAndPlugins(false).plugins; + return this.agendapointEditor.getPlugins(false); } get dirty() { diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index 050911b79..84495a280 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -131,7 +131,7 @@ export default class AgendapointEditorService extends Service { } get config() { const classificatie = this.currentSession.classificatie; - const municipality = this.defaultMunicipality; + const municipality = this.currentSession.group; return { date: { formats: [ @@ -281,13 +281,8 @@ export default class AgendapointEditorService extends Service { }; } - /** - * Get the schema and plugins for the editor. - * @param {boolean} isHeadless - Whether this is for a headless editor, as this requires - * different config to work correctly - **/ - getSchemaAndPlugins(isHeadless) { - const schema = new Schema({ + get schema() { + return new Schema({ nodes: { doc: docWithConfig({ rdfaAware: true }), paragraph, @@ -335,7 +330,14 @@ export default class AgendapointEditorService extends Service { color, }, }); + } + /** + * Get the plugins for the editor. + * @param {boolean} isHeadless - Whether this is for a headless editor, as this requires + * different config to work correctly + **/ + getPlugins(isHeadless) { const plugins = [ ...tablePlugins, tableKeymap, @@ -346,7 +348,7 @@ export default class AgendapointEditorService extends Service { shouldShowInvisibles: false, }, ), - linkPasteHandler(schema.nodes.link), + linkPasteHandler(this.schema.nodes.link), listTrackingPlugin(), emberApplication({ application: getOwner(this) }), @@ -358,12 +360,12 @@ export default class AgendapointEditorService extends Service { if (!isHeadless) { plugins.push(variableAutofillerPlugin(this.config.autofilledVariable)); } - - return { schema, plugins }; + return plugins; } getState = (html) => { - const { schema, plugins } = this.getSchemaAndPlugins(true); + const schema = this.schema; + const plugins = this.getPlugins(true); const parser = ProseParser.fromSchema(schema); const doc = htmlToDoc(html, { schema: schema, From 8b35aa91f91483abbf26f9e3a307762240ee7d56 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 6 Dec 2024 12:45:50 +0100 Subject: [PATCH 03/13] changeset --- .changeset/flat-tomatoes-develop.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/flat-tomatoes-develop.md diff --git a/.changeset/flat-tomatoes-develop.md b/.changeset/flat-tomatoes-develop.md new file mode 100644 index 000000000..3d777c708 --- /dev/null +++ b/.changeset/flat-tomatoes-develop.md @@ -0,0 +1,5 @@ +--- +'frontend-gelinkt-notuleren': patch +--- + +Wait until everything has loaded to setup plugins, schema and nodeviews From c011a899b1200ff6dd7216659444a3a2b0b7efd1 Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 9 Dec 2024 10:32:31 +0100 Subject: [PATCH 04/13] Revert "separate schema and plugins" This reverts commit 6950a3b427119e089d51b861cf967998dcdf6766. --- app/controllers/agendapoints/edit.js | 4 ++-- app/services/editor/agendapoint.js | 26 ++++++++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index 07a0e555c..9cfd6ba4f 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -49,11 +49,11 @@ export default class AgendapointsEditController extends Controller { } get schema() { - return this.agendapointEditor.schema; + return this.agendapointEditor.getSchemaAndPlugins(false).schema; } get plugins() { - return this.agendapointEditor.getPlugins(false); + return this.agendapointEditor.getSchemaAndPlugins(false).plugins; } get dirty() { diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index 84495a280..050911b79 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -131,7 +131,7 @@ export default class AgendapointEditorService extends Service { } get config() { const classificatie = this.currentSession.classificatie; - const municipality = this.currentSession.group; + const municipality = this.defaultMunicipality; return { date: { formats: [ @@ -281,8 +281,13 @@ export default class AgendapointEditorService extends Service { }; } - get schema() { - return new Schema({ + /** + * Get the schema and plugins for the editor. + * @param {boolean} isHeadless - Whether this is for a headless editor, as this requires + * different config to work correctly + **/ + getSchemaAndPlugins(isHeadless) { + const schema = new Schema({ nodes: { doc: docWithConfig({ rdfaAware: true }), paragraph, @@ -330,14 +335,7 @@ export default class AgendapointEditorService extends Service { color, }, }); - } - /** - * Get the plugins for the editor. - * @param {boolean} isHeadless - Whether this is for a headless editor, as this requires - * different config to work correctly - **/ - getPlugins(isHeadless) { const plugins = [ ...tablePlugins, tableKeymap, @@ -348,7 +346,7 @@ export default class AgendapointEditorService extends Service { shouldShowInvisibles: false, }, ), - linkPasteHandler(this.schema.nodes.link), + linkPasteHandler(schema.nodes.link), listTrackingPlugin(), emberApplication({ application: getOwner(this) }), @@ -360,12 +358,12 @@ export default class AgendapointEditorService extends Service { if (!isHeadless) { plugins.push(variableAutofillerPlugin(this.config.autofilledVariable)); } - return plugins; + + return { schema, plugins }; } getState = (html) => { - const schema = this.schema; - const plugins = this.getPlugins(true); + const { schema, plugins } = this.getSchemaAndPlugins(true); const parser = ProseParser.fromSchema(schema); const doc = htmlToDoc(html, { schema: schema, From 82ebfec38a1ad94739f88cb988fda7074889abd3 Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 9 Dec 2024 12:03:32 +0100 Subject: [PATCH 05/13] move to statically set schema and plugins --- app/controllers/agendapoints/edit.js | 43 ++++++++++++++++++++++------ app/services/editor/agendapoint.js | 2 +- app/templates/agendapoints/edit.hbs | 9 ++---- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index 9cfd6ba4f..da5276f50 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -18,6 +18,7 @@ export default class AgendapointsEditController extends Controller { @service store; @service router; @service documentService; + @service intl; @service('editor/agendapoint') agendapointEditor; @@ -26,6 +27,9 @@ export default class AgendapointsEditController extends Controller { @tracked _editorDocument; @tracked controller; @service features; + @tracked schema; + @tracked plugins; + @tracked editorSetup = false; StructureControlCard = StructureControlCardComponent; InsertArticle = InsertArticleComponent; @@ -48,14 +52,6 @@ export default class AgendapointsEditController extends Controller { return this.agendapointEditor.citationPlugin; } - get schema() { - return this.agendapointEditor.getSchemaAndPlugins(false).schema; - } - - get plugins() { - return this.agendapointEditor.getSchemaAndPlugins(false).plugins; - } - get dirty() { // Since we clear the undo history when saving, this works. If we want to maintain undo history // on save, we would need to add functionality to the editor to track what is the 'saved' state @@ -79,6 +75,37 @@ export default class AgendapointsEditController extends Controller { return null; } + get isBusy() { + return ( + !this.editorSetup || + this.saveTask.isRunning || + this.copyAgendapunt.isRunning + ); + } + + get busyText() { + if (!this.editorSetup) { + return this.intl.t('rdfa-editor-container.loading'); + } + if (this.saveTask.isRunning) { + return this.intl.t('rdfa-editor-container.making-copy'); + } + if (this.copyAgendapunt.isRunning) { + return this.intl.t('rdfa-editor-container.saving'); + } + } + + @action + setSchemaAndPlugins() { + if (!this.editorSetup) { + const { schema, plugins } = + this.agendapointEditor.getSchemaAndPlugins(false); + this.schema = schema; + this.plugins = plugins; + this.editorSetup = true; + } + } + @action async handleRdfaEditorInit(editor) { this.controller = editor; diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index 050911b79..b6b4ed5cb 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -131,7 +131,7 @@ export default class AgendapointEditorService extends Service { } get config() { const classificatie = this.currentSession.classificatie; - const municipality = this.defaultMunicipality; + const municipality = this.currentSession.group; return { date: { formats: [ diff --git a/app/templates/agendapoints/edit.hbs b/app/templates/agendapoints/edit.hbs index 734e465a1..d51260609 100644 --- a/app/templates/agendapoints/edit.hbs +++ b/app/templates/agendapoints/edit.hbs @@ -86,18 +86,15 @@ role='tabpanel' tabindex='0' aria-labelledby='tab-1' + {{did-insert this.setSchemaAndPlugins}} > Date: Mon, 9 Dec 2024 12:07:26 +0100 Subject: [PATCH 06/13] linting --- app/controllers/agendapoints/edit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index da5276f50..b53ea4d90 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -93,6 +93,7 @@ export default class AgendapointsEditController extends Controller { if (this.copyAgendapunt.isRunning) { return this.intl.t('rdfa-editor-container.saving'); } + return ''; } @action From 748351cba9924f0d48c7c62e05d8bc4ad01a513a Mon Sep 17 00:00:00 2001 From: Oscar Date: Tue, 10 Dec 2024 11:13:05 +0100 Subject: [PATCH 07/13] remove constructor and add translations --- app/controllers/agendapoints/edit.js | 4 ---- translations/en-us.yaml | 1 + translations/nl-BE.yaml | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index b53ea4d90..0ad00f55a 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -36,10 +36,6 @@ export default class AgendapointsEditController extends Controller { SnippetInsert = SnippetInsertRdfaComponent; - constructor(...args) { - super(...args); - } - get config() { return this.agendapointEditor.config; } diff --git a/translations/en-us.yaml b/translations/en-us.yaml index bee4547ea..06fd611ef 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -593,6 +593,7 @@ rdfa-editor-container: default-busy-text: Processing saving: Saving making-copy: Making copy + loading: Loading regulatory-statements-plugin: type: Regulatory Statement diff --git a/translations/nl-BE.yaml b/translations/nl-BE.yaml index a1f5403fb..96266bd88 100644 --- a/translations/nl-BE.yaml +++ b/translations/nl-BE.yaml @@ -597,6 +597,7 @@ rdfa-editor-container: default-busy-text: Bezig met verwerken saving: Bezig met opslaan making-copy: Kopie aan het maken + loading: Bezig met laden regulatory-statements-plugin: type: Reglementaire bijlage From dc209d082306eab1de724c0a3ef84e5895253721 Mon Sep 17 00:00:00 2001 From: Oscar Date: Tue, 10 Dec 2024 11:29:18 +0100 Subject: [PATCH 08/13] convert to modifier --- app/controllers/agendapoints/edit.js | 22 ++++++++++++---------- app/templates/agendapoints/edit.hbs | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index 0ad00f55a..c2537b806 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -13,6 +13,7 @@ import { getActiveEditableNode } from '@lblod/ember-rdfa-editor/plugins/_private import SnippetInsertRdfaComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-insert-rdfa'; import { fixArticleConnections } from '../../utils/fix-article-connections'; +import { modifier } from 'ember-modifier'; export default class AgendapointsEditController extends Controller { @service store; @@ -92,16 +93,17 @@ export default class AgendapointsEditController extends Controller { return ''; } - @action - setSchemaAndPlugins() { - if (!this.editorSetup) { - const { schema, plugins } = - this.agendapointEditor.getSchemaAndPlugins(false); - this.schema = schema; - this.plugins = plugins; - this.editorSetup = true; - } - } + setSchemaAndPlugins = modifier((element) => { + const { schema, plugins } = + this.agendapointEditor.getSchemaAndPlugins(false); + this.schema = schema; + this.plugins = plugins; + this.editorSetup = true; + console.log('setting up'); + return () => { + this.editorSetup = false; + }; + }); @action async handleRdfaEditorInit(editor) { diff --git a/app/templates/agendapoints/edit.hbs b/app/templates/agendapoints/edit.hbs index d51260609..b74b54fab 100644 --- a/app/templates/agendapoints/edit.hbs +++ b/app/templates/agendapoints/edit.hbs @@ -86,7 +86,7 @@ role='tabpanel' tabindex='0' aria-labelledby='tab-1' - {{did-insert this.setSchemaAndPlugins}} + {{this.setSchemaAndPlugins}} > Date: Thu, 12 Dec 2024 10:12:35 +0100 Subject: [PATCH 09/13] linting --- app/controllers/agendapoints/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index c2537b806..a48c23187 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -93,7 +93,7 @@ export default class AgendapointsEditController extends Controller { return ''; } - setSchemaAndPlugins = modifier((element) => { + setSchemaAndPlugins = modifier(() => { const { schema, plugins } = this.agendapointEditor.getSchemaAndPlugins(false); this.schema = schema; From e3c896fcca42c9d6ec1b20c4f42023b17d12ff12 Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 16 Dec 2024 13:25:47 +0100 Subject: [PATCH 10/13] redo citationplugin getter per elena suggestions --- app/services/editor/agendapoint.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index b6b4ed5cb..da5d2aef5 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -3,6 +3,7 @@ import { v4 as uuidv4 } from 'uuid'; import { removePropertiesOfDeletedNodes } from '@lblod/ember-rdfa-editor/plugins/remove-properties-of-deleted-nodes'; import { defaultAttributeValueGeneration } from '@lblod/ember-rdfa-editor/plugins/default-attribute-value-generation'; import { rdfaInfoPlugin } from '@lblod/ember-rdfa-editor/plugins/rdfa-info'; +import { tracked } from '@glimmer/tracking'; import { Schema } from '@lblod/ember-rdfa-editor'; import { @@ -126,9 +127,7 @@ export default class AgendapointEditorService extends Service { @service intl; @service currentSession; - get citationPlugin() { - return citationPlugin(this.config.citation); - } + @tracked citationPlugin; get config() { const classificatie = this.currentSession.classificatie; const municipality = this.currentSession.group; @@ -336,6 +335,8 @@ export default class AgendapointEditorService extends Service { }, }); + this.citationPlugin = citationPlugin(this.config.citation); + const plugins = [ ...tablePlugins, tableKeymap, From 9198aedd2098ae63ddd1c3c4c5cbf6ce38567388 Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 16 Dec 2024 14:39:40 +0100 Subject: [PATCH 11/13] Revert "redo citationplugin getter per elena suggestions" This reverts commit adb8ae490f0b8f568c5e094be9bc50caff36d337. --- app/services/editor/agendapoint.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index da5d2aef5..b6b4ed5cb 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -3,7 +3,6 @@ import { v4 as uuidv4 } from 'uuid'; import { removePropertiesOfDeletedNodes } from '@lblod/ember-rdfa-editor/plugins/remove-properties-of-deleted-nodes'; import { defaultAttributeValueGeneration } from '@lblod/ember-rdfa-editor/plugins/default-attribute-value-generation'; import { rdfaInfoPlugin } from '@lblod/ember-rdfa-editor/plugins/rdfa-info'; -import { tracked } from '@glimmer/tracking'; import { Schema } from '@lblod/ember-rdfa-editor'; import { @@ -127,7 +126,9 @@ export default class AgendapointEditorService extends Service { @service intl; @service currentSession; - @tracked citationPlugin; + get citationPlugin() { + return citationPlugin(this.config.citation); + } get config() { const classificatie = this.currentSession.classificatie; const municipality = this.currentSession.group; @@ -335,8 +336,6 @@ export default class AgendapointEditorService extends Service { }, }); - this.citationPlugin = citationPlugin(this.config.citation); - const plugins = [ ...tablePlugins, tableKeymap, From df560f75f709f85fd9e2186e0b63bb883ddf4deb Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 16 Dec 2024 14:42:07 +0100 Subject: [PATCH 12/13] set citation plugin in a static way --- app/controllers/agendapoints/edit.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index a48c23187..77e1ec29d 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -31,6 +31,7 @@ export default class AgendapointsEditController extends Controller { @tracked schema; @tracked plugins; @tracked editorSetup = false; + @tracked citationPlugin; StructureControlCard = StructureControlCardComponent; InsertArticle = InsertArticleComponent; @@ -45,10 +46,6 @@ export default class AgendapointsEditController extends Controller { return this.agendapointEditor.nodeViews; } - get citationPlugin() { - return this.agendapointEditor.citationPlugin; - } - get dirty() { // Since we clear the undo history when saving, this works. If we want to maintain undo history // on save, we would need to add functionality to the editor to track what is the 'saved' state @@ -97,7 +94,9 @@ export default class AgendapointsEditController extends Controller { const { schema, plugins } = this.agendapointEditor.getSchemaAndPlugins(false); this.schema = schema; - this.plugins = plugins; + const citationPlugin = this.agendapointEditor.citationPlugin; + this.plugins = [...plugins, citationPlugin]; + this.citationPlugin = citationPlugin; this.editorSetup = true; console.log('setting up'); return () => { From 5294b6744129ca272955d96281a1235ba9cfd22b Mon Sep 17 00:00:00 2001 From: Oscar Date: Wed, 18 Dec 2024 14:38:46 +0100 Subject: [PATCH 13/13] citation plugin no longer needs to be passed down to the card --- app/controllers/agendapoints/edit.js | 6 +----- app/services/editor/agendapoint.js | 5 +---- app/templates/agendapoints/edit.hbs | 2 -- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/controllers/agendapoints/edit.js b/app/controllers/agendapoints/edit.js index 77e1ec29d..dd53045d7 100644 --- a/app/controllers/agendapoints/edit.js +++ b/app/controllers/agendapoints/edit.js @@ -31,7 +31,6 @@ export default class AgendapointsEditController extends Controller { @tracked schema; @tracked plugins; @tracked editorSetup = false; - @tracked citationPlugin; StructureControlCard = StructureControlCardComponent; InsertArticle = InsertArticleComponent; @@ -94,11 +93,8 @@ export default class AgendapointsEditController extends Controller { const { schema, plugins } = this.agendapointEditor.getSchemaAndPlugins(false); this.schema = schema; - const citationPlugin = this.agendapointEditor.citationPlugin; - this.plugins = [...plugins, citationPlugin]; - this.citationPlugin = citationPlugin; + this.plugins = plugins; this.editorSetup = true; - console.log('setting up'); return () => { this.editorSetup = false; }; diff --git a/app/services/editor/agendapoint.js b/app/services/editor/agendapoint.js index b6b4ed5cb..5cec2a198 100644 --- a/app/services/editor/agendapoint.js +++ b/app/services/editor/agendapoint.js @@ -126,9 +126,6 @@ export default class AgendapointEditorService extends Service { @service intl; @service currentSession; - get citationPlugin() { - return citationPlugin(this.config.citation); - } get config() { const classificatie = this.currentSession.classificatie; const municipality = this.currentSession.group; @@ -339,7 +336,7 @@ export default class AgendapointEditorService extends Service { const plugins = [ ...tablePlugins, tableKeymap, - this.citationPlugin, + citationPlugin(this.config.citation), createInvisiblesPlugin( [hardBreak, paragraphInvisible, headingInvisible], { diff --git a/app/templates/agendapoints/edit.hbs b/app/templates/agendapoints/edit.hbs index b74b54fab..6d4cf3a09 100644 --- a/app/templates/agendapoints/edit.hbs +++ b/app/templates/agendapoints/edit.hbs @@ -121,7 +121,6 @@ />