@windoc/react 0.2.8 → 0.2.9
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -268,11 +268,11 @@ function FontTool() {
|
|
|
268
268
|
// src/toolbar/FontSizeTool.tsx
|
|
269
269
|
import { useRef as useRef5 } from "react";
|
|
270
270
|
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
271
|
-
var SIZES = [
|
|
271
|
+
var SIZES = [72, 48, 36, 24, 20, 18, 16, 14, 12, 11, 10, 9, 8];
|
|
272
272
|
function FontSizeTool() {
|
|
273
273
|
const { editorRef, rangeStyle } = useEditor();
|
|
274
274
|
const optionsRef = useRef5(null);
|
|
275
|
-
const activeSize = rangeStyle?.size ??
|
|
275
|
+
const activeSize = rangeStyle?.size ?? 11;
|
|
276
276
|
const handleSize = (size) => {
|
|
277
277
|
editorRef.current?.command.executeSize(size);
|
|
278
278
|
};
|
|
@@ -1274,6 +1274,7 @@ function Editor({
|
|
|
1274
1274
|
options: userOptions,
|
|
1275
1275
|
onChange,
|
|
1276
1276
|
onReady,
|
|
1277
|
+
onRangeStyleChange,
|
|
1277
1278
|
toolbar = true,
|
|
1278
1279
|
footer = true,
|
|
1279
1280
|
renderToolbar,
|
|
@@ -1290,6 +1291,7 @@ function Editor({
|
|
|
1290
1291
|
options: userOptions,
|
|
1291
1292
|
onChange,
|
|
1292
1293
|
onReady,
|
|
1294
|
+
onRangeStyleChange,
|
|
1293
1295
|
toolbar,
|
|
1294
1296
|
footer,
|
|
1295
1297
|
renderToolbar,
|
|
@@ -1306,6 +1308,7 @@ function EditorInner({
|
|
|
1306
1308
|
options: userOptions,
|
|
1307
1309
|
onChange,
|
|
1308
1310
|
onReady,
|
|
1311
|
+
onRangeStyleChange,
|
|
1309
1312
|
toolbar = true,
|
|
1310
1313
|
footer = true,
|
|
1311
1314
|
renderToolbar,
|
|
@@ -1349,6 +1352,7 @@ function EditorInner({
|
|
|
1349
1352
|
editorRef.current = instance;
|
|
1350
1353
|
instance.listener.rangeStyleChange = (payload) => {
|
|
1351
1354
|
setRangeStyle(payload);
|
|
1355
|
+
onRangeStyleChange?.(payload);
|
|
1352
1356
|
const rangeContext = instance?.command.getRangeContext();
|
|
1353
1357
|
if (rangeContext) {
|
|
1354
1358
|
setRowNo(rangeContext.startRowNo + 1);
|