Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add snippet placeholder nodespecs #661

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nine-wombats-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frontend-gelinkt-notuleren": minor
---

Add support for snippet placeholder nodes in regulatory statements
10 changes: 8 additions & 2 deletions app/controllers/regulatory-statements/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
Expand All @@ -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: {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
};
};
}
Expand Down
1 change: 1 addition & 0 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down