diff --git a/.changeset/nine-wombats-stare.md b/.changeset/nine-wombats-stare.md new file mode 100644 index 000000000..f31c3cf51 --- /dev/null +++ b/.changeset/nine-wombats-stare.md @@ -0,0 +1,5 @@ +--- +"frontend-gelinkt-notuleren": minor +--- + +Add support for snippet placeholder nodes in regulatory statements diff --git a/app/controllers/regulatory-statements/edit.js b/app/controllers/regulatory-statements/edit.js index 819b40239..e3603b262 100644 --- a/app/controllers/regulatory-statements/edit.js +++ b/app/controllers/regulatory-statements/edit.js @@ -87,6 +87,10 @@ import { table_of_contents, } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/table-of-contents-plugin/nodes'; import { document_title } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/document-title-plugin/nodes'; +import { + snippetPlaceholder, + snippetPlaceholderView, +} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin/nodes/snippet-placeholder'; import generateExportFromEditorDocument from 'frontend-gelinkt-notuleren/utils/generate-export-from-editor-document'; import ENV from 'frontend-gelinkt-notuleren/config/environment'; @@ -95,7 +99,7 @@ import { OCMW, } from '../../utils/bestuurseenheid-classificatie-codes'; -import SnippetInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-insert-rdfa'; +import SnippetInsertRdfaComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-insert-rdfa'; export default class RegulatoryStatementsRoute extends Controller { @service documentService; @@ -107,7 +111,7 @@ export default class RegulatoryStatementsRoute extends Controller { @service intl; editor; @tracked citationPlugin = citationPlugin(this.config.citation); - SnippetInsert = SnippetInsertComponent; + SnippetInsert = SnippetInsertRdfaComponent; schema = new Schema({ nodes: { @@ -143,6 +147,7 @@ export default class RegulatoryStatementsRoute extends Controller { block_rdfa: blockRdfaWithConfig({ rdfaAware: true }), inline_rdfa: inlineRdfaWithConfig({ rdfaAware: true }), link: link(this.config.link), + snippet_placeholder: snippetPlaceholder, }, marks: { em, @@ -172,6 +177,7 @@ export default class RegulatoryStatementsRoute extends Controller { text_variable: textVariableView(controller), templateComment: templateCommentView(controller), inline_rdfa: inlineRdfaWithConfigView({ rdfaAware: true })(controller), + snippet_placeholder: snippetPlaceholderView(controller), }; }; } diff --git a/app/styles/app.scss b/app/styles/app.scss index bde337050..e0c44b4db 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -43,6 +43,7 @@ @import "template-comments-plugin"; @import "confidentiality-plugin"; @import "worship-plugin"; +@import "snippet-plugin"; @import "project/p-annotations"; // @TODO: refactor in ember-rdfa-editor // give treatment (behandeling) content the same style as other say-documents