@lblod/ember-rdfa-editor-lblod-plugins 9.0.1 → 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
CHANGED
|
@@ -7,6 +7,17 @@ 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
|
+
|
|
10
21
|
## [9.0.1] - 2023-07-24
|
|
11
22
|
|
|
12
23
|
### Changed
|
|
@@ -587,7 +598,7 @@ add onclick handler to pencil icon in variable plugin
|
|
|
587
598
|
|
|
588
599
|
# Changelog
|
|
589
600
|
|
|
590
|
-
[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
|
|
591
602
|
[8.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.0.0...v8.0.1
|
|
592
603
|
[8.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v7.1.0...v8.0.0
|
|
593
604
|
[7.1.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v7.0.0...v7.1.0
|
|
@@ -603,6 +614,7 @@ add onclick handler to pencil icon in variable plugin
|
|
|
603
614
|
[3.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.2...v3.0.0
|
|
604
615
|
[2.1.2]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v2.1.1...v2.1.2
|
|
605
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
|
|
606
618
|
[9.0.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v9.0.0...v9.0.1
|
|
607
619
|
[9.0.0]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.1...v9.0.0
|
|
608
620
|
[8.4.1]: https://github.com/lblod/ember-rdfa-editor-lblod-plugins/compare/v8.4.0...v8.4.1
|
|
@@ -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
|
}
|