@examind/block-editor 0.8.0 → 0.9.0
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/dist/index.js +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5876,15 +5876,15 @@ function ExcelWorksheetLinkPlugin() {
|
|
|
5876
5876
|
const handleKeydown = (e) => {
|
|
5877
5877
|
const plt = getOperatingSystem();
|
|
5878
5878
|
if (plt === "macOS" /* macOS */) {
|
|
5879
|
-
if (e.metaKey) {
|
|
5880
|
-
if (e.key === "k") {
|
|
5879
|
+
if (e.metaKey && e.shiftKey) {
|
|
5880
|
+
if (e.key === "k" || e.key === "K") {
|
|
5881
5881
|
createNode();
|
|
5882
5882
|
e.preventDefault();
|
|
5883
5883
|
e.stopPropagation();
|
|
5884
5884
|
}
|
|
5885
5885
|
}
|
|
5886
5886
|
} else {
|
|
5887
|
-
if (e.ctrlKey && e.key === "k") {
|
|
5887
|
+
if (e.ctrlKey && e.shiftKey && (e.key === "k" || e.key === "K")) {
|
|
5888
5888
|
createNode();
|
|
5889
5889
|
e.preventDefault();
|
|
5890
5890
|
e.stopPropagation();
|
|
@@ -14263,7 +14263,8 @@ function TextToolbarPlugin() {
|
|
|
14263
14263
|
fontWeight: "",
|
|
14264
14264
|
color: "",
|
|
14265
14265
|
bgColor: "",
|
|
14266
|
-
textAlign: "left"
|
|
14266
|
+
textAlign: "left",
|
|
14267
|
+
isExcelCopyText: false
|
|
14267
14268
|
});
|
|
14268
14269
|
const selectedNodeRef = (0, import_react78.useRef)(null);
|
|
14269
14270
|
const [selectionType, setSelectionType] = (0, import_react78.useState)("paragraph");
|
|
@@ -14638,6 +14639,9 @@ function TextToolbarPlugin() {
|
|
|
14638
14639
|
} else {
|
|
14639
14640
|
newToolbarState.textAlign = "left";
|
|
14640
14641
|
}
|
|
14642
|
+
newToolbarState.isExcelCopyText = selectedNodes.some(
|
|
14643
|
+
(node) => $isExcelCopyTextNode(node) || $isExcelCopyTextNode(node.getParent())
|
|
14644
|
+
);
|
|
14641
14645
|
setToolbarState(newToolbarState);
|
|
14642
14646
|
});
|
|
14643
14647
|
}
|
|
@@ -14809,7 +14813,8 @@ function TextToolbarPlugin() {
|
|
|
14809
14813
|
id: "excel-copy-text",
|
|
14810
14814
|
label: "",
|
|
14811
14815
|
Icon: import_lucide_react20.ClipboardCheck,
|
|
14812
|
-
|
|
14816
|
+
selected: toolbarState.isExcelCopyText,
|
|
14817
|
+
tooltip: "Copy Text Mark",
|
|
14813
14818
|
onClick: () => {
|
|
14814
14819
|
activeEditorRef.current?.dispatchCommand(
|
|
14815
14820
|
EXCEL_COPY_TEXT_CREATE_COMMAND,
|
package/dist/index.mjs
CHANGED
|
@@ -6021,15 +6021,15 @@ function ExcelWorksheetLinkPlugin() {
|
|
|
6021
6021
|
const handleKeydown = (e) => {
|
|
6022
6022
|
const plt = getOperatingSystem();
|
|
6023
6023
|
if (plt === "macOS" /* macOS */) {
|
|
6024
|
-
if (e.metaKey) {
|
|
6025
|
-
if (e.key === "k") {
|
|
6024
|
+
if (e.metaKey && e.shiftKey) {
|
|
6025
|
+
if (e.key === "k" || e.key === "K") {
|
|
6026
6026
|
createNode();
|
|
6027
6027
|
e.preventDefault();
|
|
6028
6028
|
e.stopPropagation();
|
|
6029
6029
|
}
|
|
6030
6030
|
}
|
|
6031
6031
|
} else {
|
|
6032
|
-
if (e.ctrlKey && e.key === "k") {
|
|
6032
|
+
if (e.ctrlKey && e.shiftKey && (e.key === "k" || e.key === "K")) {
|
|
6033
6033
|
createNode();
|
|
6034
6034
|
e.preventDefault();
|
|
6035
6035
|
e.stopPropagation();
|
|
@@ -14712,7 +14712,8 @@ function TextToolbarPlugin() {
|
|
|
14712
14712
|
fontWeight: "",
|
|
14713
14713
|
color: "",
|
|
14714
14714
|
bgColor: "",
|
|
14715
|
-
textAlign: "left"
|
|
14715
|
+
textAlign: "left",
|
|
14716
|
+
isExcelCopyText: false
|
|
14716
14717
|
});
|
|
14717
14718
|
const selectedNodeRef = useRef43(null);
|
|
14718
14719
|
const [selectionType, setSelectionType] = useState15("paragraph");
|
|
@@ -15087,6 +15088,9 @@ function TextToolbarPlugin() {
|
|
|
15087
15088
|
} else {
|
|
15088
15089
|
newToolbarState.textAlign = "left";
|
|
15089
15090
|
}
|
|
15091
|
+
newToolbarState.isExcelCopyText = selectedNodes.some(
|
|
15092
|
+
(node) => $isExcelCopyTextNode(node) || $isExcelCopyTextNode(node.getParent())
|
|
15093
|
+
);
|
|
15090
15094
|
setToolbarState(newToolbarState);
|
|
15091
15095
|
});
|
|
15092
15096
|
}
|
|
@@ -15258,7 +15262,8 @@ function TextToolbarPlugin() {
|
|
|
15258
15262
|
id: "excel-copy-text",
|
|
15259
15263
|
label: "",
|
|
15260
15264
|
Icon: ClipboardCheck,
|
|
15261
|
-
|
|
15265
|
+
selected: toolbarState.isExcelCopyText,
|
|
15266
|
+
tooltip: "Copy Text Mark",
|
|
15262
15267
|
onClick: () => {
|
|
15263
15268
|
activeEditorRef.current?.dispatchCommand(
|
|
15264
15269
|
EXCEL_COPY_TEXT_CREATE_COMMAND,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@examind/block-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"@comment version": [
|
|
5
5
|
"Don't specify package version here. It will be injected by publish workflow."
|
|
6
6
|
],
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"tsup": "^8.3.5",
|
|
63
63
|
"typescript": "^5.7.2",
|
|
64
64
|
"typescript-eslint": "^8.18.2",
|
|
65
|
-
"@examind/block-types": "0.
|
|
65
|
+
"@examind/block-types": "0.9.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@dnd-kit/core": "6.3.1",
|