@fileverse-dev/fortune-react 1.3.13-create-1 → 1.3.13-create-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.
@@ -467,15 +467,27 @@ var InputBox = function InputBox() {
467
467
  }
468
468
  if (e.code === "KeyB") {
469
469
  handleBold(context, inputRef.current);
470
+ appendFormulaHistoryFromPrimaryEditor(function () {
471
+ return getCursorPosition(inputRef.current);
472
+ });
470
473
  stopPropagation(e);
471
474
  } else if (e.code === "KeyI") {
472
475
  handleItalic(context, inputRef.current);
476
+ appendFormulaHistoryFromPrimaryEditor(function () {
477
+ return getCursorPosition(inputRef.current);
478
+ });
473
479
  stopPropagation(e);
474
480
  } else if (e.code === "KeyU") {
475
481
  handleUnderline(context, inputRef.current);
482
+ appendFormulaHistoryFromPrimaryEditor(function () {
483
+ return getCursorPosition(inputRef.current);
484
+ });
476
485
  stopPropagation(e);
477
486
  } else if (e.code === "KeyS") {
478
487
  handleStrikeThrough(context, inputRef.current);
488
+ appendFormulaHistoryFromPrimaryEditor(function () {
489
+ return getCursorPosition(inputRef.current);
490
+ });
479
491
  stopPropagation(e);
480
492
  }
481
493
  }
@@ -476,15 +476,27 @@ var InputBox = function InputBox() {
476
476
  }
477
477
  if (e.code === "KeyB") {
478
478
  (0, _fortuneCore.handleBold)(context, inputRef.current);
479
+ appendFormulaHistoryFromPrimaryEditor(function () {
480
+ return (0, _helper.getCursorPosition)(inputRef.current);
481
+ });
479
482
  stopPropagation(e);
480
483
  } else if (e.code === "KeyI") {
481
484
  (0, _fortuneCore.handleItalic)(context, inputRef.current);
485
+ appendFormulaHistoryFromPrimaryEditor(function () {
486
+ return (0, _helper.getCursorPosition)(inputRef.current);
487
+ });
482
488
  stopPropagation(e);
483
489
  } else if (e.code === "KeyU") {
484
490
  (0, _fortuneCore.handleUnderline)(context, inputRef.current);
491
+ appendFormulaHistoryFromPrimaryEditor(function () {
492
+ return (0, _helper.getCursorPosition)(inputRef.current);
493
+ });
485
494
  stopPropagation(e);
486
495
  } else if (e.code === "KeyS") {
487
496
  (0, _fortuneCore.handleStrikeThrough)(context, inputRef.current);
497
+ appendFormulaHistoryFromPrimaryEditor(function () {
498
+ return (0, _helper.getCursorPosition)(inputRef.current);
499
+ });
488
500
  stopPropagation(e);
489
501
  }
490
502
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.3.13-create-1",
3
+ "version": "1.3.13-create-2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.3.13-create-1",
19
+ "@fileverse-dev/fortune-core": "1.3.13-create-2",
20
20
  "@fileverse/ui": "5.0.0",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",