react-lite-rich-text-editor 1.1.7 → 1.1.8

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.cjs.js CHANGED
@@ -2058,12 +2058,9 @@ function RichTextEditor({
2058
2058
  }, /*#__PURE__*/React.createElement("button", {
2059
2059
  type: "button",
2060
2060
  title: "Bold",
2061
- onClick: e => {
2061
+ onMouseDown: e => {
2062
2062
  e.preventDefault();
2063
- e.stopPropagation();
2064
- document.execCommand("bold");
2065
- handleInput();
2066
- focus();
2063
+ exec("bold");
2067
2064
  },
2068
2065
  className: `rte-toolbar-button ${isBold ? "active" : ""}`
2069
2066
  }, /*#__PURE__*/React.createElement(FaBold, {
@@ -2071,12 +2068,9 @@ function RichTextEditor({
2071
2068
  })), /*#__PURE__*/React.createElement("button", {
2072
2069
  type: "button",
2073
2070
  title: "Italic",
2074
- onClick: e => {
2071
+ onMouseDown: e => {
2075
2072
  e.preventDefault();
2076
- e.stopPropagation();
2077
- document.execCommand("italic");
2078
- handleInput();
2079
- focus();
2073
+ exec("italic");
2080
2074
  },
2081
2075
  className: `rte-toolbar-button ${isItalic ? "active" : ""}`
2082
2076
  }, /*#__PURE__*/React.createElement(FaItalic, {
@@ -2084,12 +2078,9 @@ function RichTextEditor({
2084
2078
  })), /*#__PURE__*/React.createElement("button", {
2085
2079
  type: "button",
2086
2080
  title: "Underline",
2087
- onClick: e => {
2081
+ onMouseDown: e => {
2088
2082
  e.preventDefault();
2089
- e.stopPropagation();
2090
- document.execCommand("underline");
2091
- handleInput();
2092
- focus();
2083
+ exec("underline");
2093
2084
  },
2094
2085
  className: `rte-toolbar-button ${isUnderline ? "active" : ""}`
2095
2086
  }, /*#__PURE__*/React.createElement(FaUnderline, {