@lblod/ember-rdfa-editor-lblod-plugins 9.0.0 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/Dockerfile +5 -3
- package/addon/components/snippet-plugin/snippet-insert.ts +17 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [9.0.2] - 2023-07-28
|
|
11
|
+
### Dependencies
|
|
12
|
+
- Bumps `release-it` from 15.5.0 to 15.11.0
|
|
13
|
+
- Bumps `@codemirror/lang-html` from 6.4.3 to 6.4.5
|
|
14
|
+
- Bumps `@types/ember-data__model` from 4.0.0 to 4.0.1
|
|
15
|
+
- Bumps `eslint-plugin-ember` from 11.9.0 to 11.10.0
|
|
16
|
+
- Bumps `@types/ember__runloop` from 4.0.2 to 4.0.3
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Snippet insertion accounts for wrapping document
|
|
20
|
+
|
|
21
|
+
## [9.0.1] - 2023-07-24
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- Update docker build to serve static files
|
|
25
|
+
|
|
10
26
|
## [9.0.0] - 2023-07-24
|
|
11
27
|
|
|
12
28
|
### Added
|
|
@@ -582,7 +598,7 @@ add onclick handler to pencil icon in variable plugin
|
|
|
582
598
|
|
|
583
599
|
# Changelog
|
|
584
600
|
|
|
585
|
-
[unreleased]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v9.0.
|
|
601
|
+
[unreleased]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v9.0.2...HEAD
|
|
586
602
|
[8.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.0.0...v8.0.1
|
|
587
603
|
[8.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v7.1.0...v8.0.0
|
|
588
604
|
[7.1.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v7.0.0...v7.1.0
|
|
@@ -598,6 +614,8 @@ add onclick handler to pencil icon in variable plugin
|
|
|
598
614
|
[3.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.2...v3.0.0
|
|
599
615
|
[2.1.2]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.1...v2.1.2
|
|
600
616
|
[2.1.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.0...v2.1.1
|
|
617
|
+
[9.0.2]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v9.0.1...v9.0.2
|
|
618
|
+
[9.0.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v9.0.0...v9.0.1
|
|
601
619
|
[9.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.1...v9.0.0
|
|
602
620
|
[8.4.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.0...v8.4.1
|
|
603
621
|
[8.4.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.3.0...v8.4.0
|
package/Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM madnificent/ember:4.
|
|
1
|
+
FROM madnificent/ember:4.12.1-node_18 as builder
|
|
2
2
|
|
|
3
3
|
LABEL maintainer="info@redpencil.io"
|
|
4
4
|
|
|
@@ -6,5 +6,7 @@ WORKDIR /app
|
|
|
6
6
|
COPY package.json package-lock.json ./
|
|
7
7
|
RUN npm ci
|
|
8
8
|
COPY . .
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
RUN ember build -prod
|
|
10
|
+
|
|
11
|
+
FROM semtech/static-file-service:0.2.0
|
|
12
|
+
COPY --from=builder /app/dist /data
|
|
@@ -36,15 +36,27 @@ export default class SnippetInsertComponent extends Component<Args> {
|
|
|
36
36
|
@action
|
|
37
37
|
onInsert(content: string) {
|
|
38
38
|
const domParser = new DOMParser();
|
|
39
|
+
const parsed = domParser.parseFromString(content, 'text/html').body;
|
|
40
|
+
const documentDiv = parsed.querySelector('div[data-say-document="true"]');
|
|
39
41
|
|
|
40
42
|
this.closeModal();
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
if (documentDiv) {
|
|
45
|
+
return this.controller.withTransaction((tr) =>
|
|
46
|
+
tr.replaceSelectionWith(
|
|
47
|
+
ProseParser.fromSchema(this.controller.schema).parse(documentDiv, {
|
|
48
|
+
preserveWhitespace: true,
|
|
49
|
+
}),
|
|
46
50
|
),
|
|
47
51
|
);
|
|
48
|
-
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
this.controller.withTransaction((tr) =>
|
|
55
|
+
tr.replaceSelectionWith(
|
|
56
|
+
ProseParser.fromSchema(this.controller.schema).parse(parsed, {
|
|
57
|
+
preserveWhitespace: true,
|
|
58
|
+
}),
|
|
59
|
+
),
|
|
60
|
+
);
|
|
49
61
|
}
|
|
50
62
|
}
|