@rg-dev/tinymce-helpers 1.0.13 → 1.0.14

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.
Files changed (2) hide show
  1. package/index.mjs +31 -25
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -120,7 +120,7 @@ function resolvePatch(defaults, patch) {
120
120
  } else {
121
121
  resolved = patch;
122
122
  }
123
- const _b = resolved, { target, setup, selector } = _b, safe = __objRest(_b, ["target", "setup", "selector"]);
123
+ const _b = resolved || {}, { target, setup, selector } = _b, safe = __objRest(_b, ["target", "setup", "selector"]);
124
124
  return safe;
125
125
  }
126
126
  var ListBuilder = class {
@@ -376,36 +376,42 @@ var tinymceHelpers = class _tinymceHelpers {
376
376
  input.click();
377
377
  }
378
378
  });
379
- editor.ui.registry.addButton("decreaseFontSize", {
380
- tooltip: "Decrease Font Size",
381
- icon: "minus",
382
- onAction: () => {
383
- const currentSize = editor.queryCommandValue("FontSize");
384
- let newSize = 16;
385
- if (currentSize) {
386
- const sizeNum = parseInt(currentSize.toString());
387
- if (!isNaN(sizeNum) && sizeNum > 8) {
388
- newSize = sizeNum - 2;
379
+ editor.ui.registry.addButton(
380
+ "decreaseFontSize",
381
+ {
382
+ tooltip: "Decrease Font Size",
383
+ icon: "minus",
384
+ onAction: () => {
385
+ const currentSize = editor.queryCommandValue("FontSize");
386
+ let newSize = 16;
387
+ if (currentSize) {
388
+ const sizeNum = parseInt(currentSize.toString());
389
+ if (!isNaN(sizeNum) && sizeNum > 8) {
390
+ newSize = sizeNum - 2;
391
+ }
389
392
  }
393
+ editor.execCommand("FontSize", false, newSize + "px");
390
394
  }
391
- editor.execCommand("FontSize", false, newSize + "px");
392
395
  }
393
- });
394
- editor.ui.registry.addButton("increaseFontSize", {
395
- tooltip: "Increase Font Size",
396
- icon: "plus",
397
- onAction: () => {
398
- const currentSize = editor.queryCommandValue("FontSize");
399
- let newSize = 16;
400
- if (currentSize) {
401
- const sizeNum = parseInt(currentSize.toString());
402
- if (!isNaN(sizeNum)) {
403
- newSize = sizeNum + 2;
396
+ );
397
+ editor.ui.registry.addButton(
398
+ "increaseFontSize",
399
+ {
400
+ tooltip: "Increase Font Size",
401
+ icon: "plus",
402
+ onAction: () => {
403
+ const currentSize = editor.queryCommandValue("FontSize");
404
+ let newSize = 16;
405
+ if (currentSize) {
406
+ const sizeNum = parseInt(currentSize.toString());
407
+ if (!isNaN(sizeNum)) {
408
+ newSize = sizeNum + 2;
409
+ }
404
410
  }
411
+ editor.execCommand("FontSize", false, newSize + "px");
405
412
  }
406
- editor.execCommand("FontSize", false, newSize + "px");
407
413
  }
408
- });
414
+ );
409
415
  editor.ui.registry.addButton(
410
416
  "myBlockquote",
411
417
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rg-dev/tinymce-helpers",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {