-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] update README.md, support touch events
- Loading branch information
Showing
8 changed files
with
184 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,14 @@ | ||
<div class="flex w-64"> | ||
<button | ||
title="Undo" | ||
class="flex-1 text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-r-2 border-r-blue-50 border-b-blue-50 hover:text-gray-900 whitespace-nowrap" | ||
(mousedown)="undo($event)"> | ||
<span class="material-symbols-outlined">undo</span> | ||
</button> | ||
<button | ||
title="Redo" | ||
class="flex-1 text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-b-blue-50 hover:text-gray-900 whitespace-nowrap" | ||
(mousedown)="redo($event)"> | ||
<span class="material-symbols-outlined">redo</span> | ||
</button> | ||
</div> | ||
<div class="flex-1 flex w-64"> | ||
<button | ||
title="Bold" | ||
class="text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-b-blue-50 hover:text-gray-900" | ||
(mousedown)="setBold($event)"> | ||
<span class="material-symbols-outlined">format_bold</span> | ||
</button> | ||
<button | ||
title="Italic" | ||
class="flex-1 text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-b-blue-50 hover:text-gray-900" | ||
(mousedown)="setItalic($event)"> | ||
<span class="material-symbols-outlined">format_italic</span> | ||
</button> | ||
<button | ||
title="Underline" | ||
class="flex-1 text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-b-blue-50 hover:text-gray-900" | ||
(mousedown)="strikethrough($event)"> | ||
<span class="material-symbols-outlined">format_strikethrough</span> | ||
</button> | ||
<button | ||
title="Quote" | ||
class="flex-1 text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-b-blue-50 hover:text-gray-900" | ||
(mousedown)="quote($event)"> | ||
<span class="material-symbols-outlined">format_quote</span> | ||
</button> | ||
</div> | ||
@for(line of buttons;track line){ | ||
<div class="flex-1 flex w-64"> | ||
@for(button of line;track button){ | ||
<button | ||
[title]="button.title" | ||
class="flex-1 text-gray-600 text-xs bg-slate-200 px-2 py-1 hover:bg-slate-300 border border-b-blue-50 hover:text-gray-900" | ||
(mousedown)="mousedown($event, button.command)" | ||
(touchstart)="mousedown($event, button.command)" | ||
> | ||
<span class="material-symbols-outlined">{{ button.icon }}</span> | ||
</button> | ||
} | ||
</div> | ||
} |
Oops, something went wrong.