Skip to content

Commit

Permalink
bug: readonly editor enabled toolbar buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
umaranis committed Nov 13, 2024
1 parent 36908fb commit 847b783
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{buttonIconClassName}
{buttonLabel}
{title}
disabled={!isEditable}
disabled={!$isEditable}
{stopCloseOnClickSelf}>
<ColorPicker {color} {onChange} />
</DropDown>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<button
disabled={!isEditable}
disabled={!$isEditable}
on:click={() => {
$activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold');
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<input
type="number"
bind:value={inputValue}
disabled={!isEditable}
disabled={!$isEditable}
class="toolbar-item sl_font-size-input"
min={MIN_ALLOWED_FONT_SIZE}
max={MAX_ALLOWED_FONT_SIZE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<button
disabled={!isEditable}
disabled={!$isEditable}
on:click={() => {
$activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic');
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</script>

<button
disabled={!isEditable}
disabled={!$isEditable}
on:click={() => {
$activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough');
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<button
disabled={!isEditable}
disabled={!$isEditable}
on:click={() => {
$activeEditor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline');
}}
Expand Down

0 comments on commit 847b783

Please sign in to comment.