@limetech/lime-elements 37.53.2 → 37.53.4
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 +17 -0
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +12 -9
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js +11 -8
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +12 -9
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-1d581d7d.entry.js → p-4cb6a571.entry.js} +2 -2
- package/dist/lime-elements/p-4cb6a571.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-1d581d7d.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [37.53.4](https://github.com/Lundalogik/lime-elements/compare/v37.53.3...v37.53.4) (2024-07-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **text-editor:** ensure the link menu is correctly displayed ([40cbd32](https://github.com/Lundalogik/lime-elements/commit/40cbd32d343f7efe773f7935ca55fec1eafa8169))
|
|
8
|
+
|
|
9
|
+
## [37.53.3](https://github.com/Lundalogik/lime-elements/compare/v37.53.2...v37.53.3) (2024-07-03)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
* **text-editor:** selected text now used for copying link text ([39e40c6](https://github.com/Lundalogik/lime-elements/commit/39e40c66a11a07d7346d2a26c38badf9f892aff4))
|
|
16
|
+
* **text-editor:** selected text now used for copying link text across nodes ([2350727](https://github.com/Lundalogik/lime-elements/commit/23507278d4edd16c374b2fe72b73b5e1348758e4))
|
|
17
|
+
|
|
1
18
|
## [37.53.2](https://github.com/Lundalogik/lime-elements/compare/v37.53.1...v37.53.2) (2024-06-27)
|
|
2
19
|
|
|
3
20
|
|
|
@@ -25631,15 +25631,18 @@ const updateLink = (view, updateLinkCallback) => {
|
|
|
25631
25631
|
const { from, to } = view.state.selection;
|
|
25632
25632
|
let text = '';
|
|
25633
25633
|
let href = '';
|
|
25634
|
-
view.state.doc.nodesBetween(from, to, (node) => {
|
|
25635
|
-
if (node.type.name
|
|
25636
|
-
|
|
25637
|
-
node.marks.forEach((mark) => {
|
|
25638
|
-
if (mark.type.name === 'link') {
|
|
25639
|
-
href = mark.attrs.href;
|
|
25640
|
-
}
|
|
25641
|
-
});
|
|
25634
|
+
view.state.doc.nodesBetween(from, to, (node, pos) => {
|
|
25635
|
+
if (node.type.name !== 'text') {
|
|
25636
|
+
return;
|
|
25642
25637
|
}
|
|
25638
|
+
const fromInNode = Math.max(0, from - pos);
|
|
25639
|
+
const toInNode = Math.min(node.text.length, to - pos);
|
|
25640
|
+
text += node.text.slice(fromInNode, toInNode);
|
|
25641
|
+
node.marks.forEach((mark) => {
|
|
25642
|
+
if (mark.type.name === 'link') {
|
|
25643
|
+
href = mark.attrs.href;
|
|
25644
|
+
}
|
|
25645
|
+
});
|
|
25643
25646
|
});
|
|
25644
25647
|
if (updateLinkCallback) {
|
|
25645
25648
|
updateLinkCallback(text, href);
|
|
@@ -26093,7 +26096,7 @@ const ProsemirrorAdapter = class {
|
|
|
26093
26096
|
if (!this.isLinkMenuOpen) {
|
|
26094
26097
|
return;
|
|
26095
26098
|
}
|
|
26096
|
-
return (index.h("limel-portal", { containerId: this.portalId, visible: this.isLinkMenuOpen, openDirection: "top", inheritParentWidth: true, anchor: this.actionBarElement
|
|
26099
|
+
return (index.h("limel-portal", { containerId: this.portalId, visible: this.isLinkMenuOpen, openDirection: "top", inheritParentWidth: true, anchor: this.actionBarElement }, index.h("limel-text-editor-link-menu", { link: this.link, isOpen: this.isLinkMenuOpen, onLinkChange: this.handleLinkChange, onCancel: this.handleCancelLinkMenu, onSave: this.handleSaveLinkMenu })));
|
|
26097
26100
|
}
|
|
26098
26101
|
setupContentConverter() {
|
|
26099
26102
|
if (this.contentType === 'markdown') {
|