lexxy 0.9.13.beta → 0.9.14.beta

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97cf5bf0fcc025d3ec9064f73665b7127b81daca68c91281c9e365c7fe5742ad
4
- data.tar.gz: dc26d1228a98da394ac222d046a24cf3ffbd71d72f83245311ab9fdd0334a1db
3
+ metadata.gz: a6400fe4f84e273a2028af153efe203474e103a0f507d1b72ddd4096ed292e52
4
+ data.tar.gz: a2f2ca9843421ea5a9fba94b22da2d95c218e5c96744d7f182ed471efdcb5556
5
5
  SHA512:
6
- metadata.gz: 103f687cdc45cc9c3b7b6c5454cb044294c3f1f944ce465a54fcf9285b2ce57ce5cf0c0316a68d4b1ee323d796beb4e74d4d366a1138276ab8e63e390b7ce207
7
- data.tar.gz: d4d9b8b61d43b8ab8983547b657e8785907222564913177fbfdd25f77cf2b72fb832c2d4ebe887d38b5df6b5f020680d3eb7c767bf09e1102c70d4ca4567b9d8
6
+ metadata.gz: 5ca317b2a76ab77e177c30113c9568eea2a035a472ee465c4aa479948e9e74e1ebed7354e61a62438bc66a7d079d80df625038d8d4da815bcc31205a022c1726
7
+ data.tar.gz: 9cfe9d96efcbda91237d913f6a07df984390d012a97644534a74aff6175fdabdb6820944e70a4614f747e1975b9726f82548c1ae6dd95b5da33d4a44d0511d75
data/README.md CHANGED
@@ -2,9 +2,6 @@
2
2
 
3
3
  A modern rich text editor for Rails.
4
4
 
5
- > [!IMPORTANT]
6
- > This is a beta. It hasn't been battle-tested yet. Please try it out and report any issues you find.
7
-
8
5
  **[Try it out!](https://basecamp.github.io/lexxy/try-it)**
9
6
 
10
7
  ## Features
@@ -6795,14 +6795,14 @@ class LexicalToolbarElement extends HTMLElement {
6795
6795
 
6796
6796
  this.#setButtonPressed("bold", isBold);
6797
6797
  this.#setButtonPressed("italic", isItalic);
6798
+ this.#setButtonPressed("strikethrough", isStrikethrough);
6799
+ this.#setButtonPressed("underline", isUnderline);
6798
6800
 
6799
- this.#setButtonPressed("format", isInHeading || isStrikethrough || isUnderline);
6801
+ this.#setButtonPressed("format", isInHeading);
6800
6802
  this.#setButtonPressed("paragraph", !isInHeading);
6801
6803
  this.#setButtonPressed("heading-large", headingTag === "h2");
6802
6804
  this.#setButtonPressed("heading-medium", headingTag === "h3");
6803
6805
  this.#setButtonPressed("heading-small", headingTag === "h4");
6804
- this.#setButtonPressed("strikethrough", isStrikethrough);
6805
- this.#setButtonPressed("underline", isUnderline);
6806
6806
 
6807
6807
  this.#setButtonPressed("lists", isInList);
6808
6808
  this.#setButtonPressed("unordered-list", isInList && listType === "bullet");
@@ -6965,6 +6965,14 @@ class LexicalToolbarElement extends HTMLElement {
6965
6965
  ${ToolbarIcons.italic}
6966
6966
  </button>
6967
6967
 
6968
+ <button class="lexxy-editor__toolbar-button" type="button" name="strikethrough" data-command="strikethrough" title="Strikethrough">
6969
+ ${ToolbarIcons.strikethrough}
6970
+ </button>
6971
+
6972
+ <button class="lexxy-editor__toolbar-button lexxy-editor__toolbar-group-end" type="button" name="underline" data-command="underline" title="Underline">
6973
+ ${ToolbarIcons.underline}
6974
+ </button>
6975
+
6968
6976
  <lexxy-toolbar-dropdown class="lexxy-editor__toolbar-dropdown">
6969
6977
  <button data-dropdown-trigger class="lexxy-editor__toolbar-button lexxy-editor__toolbar-button--chevron" type="button" name="format" title="Text formatting" aria-haspopup="menu" aria-expanded="false">
6970
6978
  ${ToolbarIcons.heading}
@@ -6983,13 +6991,6 @@ class LexicalToolbarElement extends HTMLElement {
6983
6991
  ${ToolbarIcons.h4} <span>Small Heading</span>
6984
6992
  </button>
6985
6993
  <div class="lexxy-editor__toolbar-separator" role="separator"></div>
6986
- <button type="button" name="strikethrough" data-command="strikethrough" title="Strikethrough" role="menuitem">
6987
- ${ToolbarIcons.strikethrough} <span>Strikethrough</span>
6988
- </button>
6989
- <button type="button" name="underline" data-command="underline" title="Underline" role="menuitem">
6990
- ${ToolbarIcons.underline} <span>Underline</span>
6991
- </button>
6992
- <div class="lexxy-editor__toolbar-separator" role="separator"></div>
6993
6994
  <button type="button" name="clear-formatting" data-command="clearFormatting" title="Clear formatting" role="menuitem">
6994
6995
  ${ToolbarIcons.clearFormatting} <span>Clear formatting</span>
6995
6996
  </button>
@@ -15758,6 +15759,8 @@ class TableController {
15758
15759
 
15759
15760
  this.currentCellKey = cellNode?.getKey() ?? null;
15760
15761
  this.currentTableNodeKey = tableNode?.getKey() ?? null;
15762
+
15763
+ return tableNode
15761
15764
  }
15762
15765
 
15763
15766
  executeTableCommand(command, customIndex = null) {
@@ -16260,9 +16263,8 @@ class TableTools extends HTMLElement {
16260
16263
 
16261
16264
  #monitorForTableSelection() {
16262
16265
  this.#listeners.track(this.#editor.registerUpdateListener(() => {
16263
- this.tableController.updateSelectedTable();
16266
+ const tableNode = this.#editor.getRootElement() && this.tableController.updateSelectedTable();
16264
16267
 
16265
- const tableNode = this.tableController.currentTableNode;
16266
16268
  if (tableNode) {
16267
16269
  this.#show();
16268
16270
  } else {
Binary file
Binary file