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