updates for review
@@ -36,11 +36,10 @@
|
||||
"@tiptap/extension-code": "3.0.0-beta.14",
|
||||
"@tiptap/extension-code-block": "3.0.0-beta.14",
|
||||
"@tiptap/extension-document": "3.0.0-beta.14",
|
||||
"@tiptap/extension-dropcursor": "3.0.0-beta.14",
|
||||
"@tiptap/extension-hard-break": "^3.0.0-beta.14",
|
||||
"@tiptap/extension-hard-break": "3.0.0-beta.14",
|
||||
"@tiptap/extension-heading": "3.0.0-beta.14",
|
||||
"@tiptap/extension-highlight": "^3.0.0-beta.14",
|
||||
"@tiptap/extension-horizontal-rule": "^3.0.0-beta.14",
|
||||
"@tiptap/extension-horizontal-rule": "3.0.0-beta.14",
|
||||
"@tiptap/extension-image": "3.0.0-beta.14",
|
||||
"@tiptap/extension-italic": "3.0.0-beta.14",
|
||||
"@tiptap/extension-link": "3.0.0-beta.14",
|
||||
@@ -52,7 +51,7 @@
|
||||
"@tiptap/extension-subscript": "3.0.0-beta.14",
|
||||
"@tiptap/extension-superscript": "3.0.0-beta.14",
|
||||
"@tiptap/extension-text": "3.0.0-beta.14",
|
||||
"@tiptap/extension-text-align": "^3.0.0-beta.14",
|
||||
"@tiptap/extension-text-align": "3.0.0-beta.14",
|
||||
"@tiptap/extension-underline": "3.0.0-beta.14",
|
||||
"@tiptap/extensions": "3.0.0-beta.14",
|
||||
"@tiptap/pm": "3.0.0-beta.14",
|
||||
|
||||
@@ -55,7 +55,7 @@ use Filament\Forms\Components\RichEditor;
|
||||
RichEditor::make('content')
|
||||
->toolbarButtons([
|
||||
['bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'link'],
|
||||
['h2', 'h3'],
|
||||
['h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd'], // The `alignJustify` tool is also available.
|
||||
['blockquote', 'codeBlock', 'bulletList', 'orderedList', 'horizontalRule', 'highlight', 'lead', 'small'],
|
||||
['attachFiles'], // The `customBlocks` and `mergeTags` tools are also added here if those features are used.
|
||||
['undo', 'redo'],
|
||||
|
||||
@@ -11,6 +11,7 @@ use Filament\Forms\Components\RichEditor\TipTapExtensions\LeadExtension;
|
||||
use Filament\Forms\Components\RichEditor\TipTapExtensions\MergeTagExtension;
|
||||
use Filament\Forms\Components\RichEditor\TipTapExtensions\RenderedCustomBlockExtension;
|
||||
use Filament\Forms\Components\RichEditor\TipTapExtensions\SmallExtension;
|
||||
use Filament\Forms\Components\RichEditor\TipTapExtensions\TextAlignExtension;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -18,7 +19,6 @@ use League\Flysystem\UnableToCheckFileExistence;
|
||||
use Throwable;
|
||||
use Tiptap\Core\Extension;
|
||||
use Tiptap\Editor;
|
||||
use Tiptap\Extensions\TextAlign;
|
||||
use Tiptap\Marks\Bold;
|
||||
use Tiptap\Marks\Code;
|
||||
use Tiptap\Marks\Highlight;
|
||||
@@ -259,11 +259,7 @@ class RichContentRenderer implements Htmlable
|
||||
app(Subscript::class),
|
||||
app(Superscript::class),
|
||||
app(Text::class),
|
||||
new TextAlign([
|
||||
'types' => ['heading', 'paragraph'],
|
||||
'alignments' => ['start', 'center', 'end', 'justify'],
|
||||
'defaultAlignment' => 'start',
|
||||
]),
|
||||
app(TextAlignExtension::class),
|
||||
app(Underline::class),
|
||||
...array_reduce(
|
||||
$this->getPlugins(),
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Filament\Forms\Components\RichEditor\TipTapExtensions;
|
||||
|
||||
use Tiptap\Extensions\TextAlign;
|
||||
|
||||
class TextAlignExtension extends TextAlign
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function addOptions(): array
|
||||
{
|
||||
return [
|
||||
...parent::addOptions(),
|
||||
[
|
||||
'types' => ['heading', 'paragraph'],
|
||||
'alignments' => ['start', 'center', 'end', 'justify'],
|
||||
'defaultAlignment' => 'start',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2") format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-wght-normal-EWLSKVKN.woff2") format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-ext-wght-normal-7GGTF7EK.woff2") format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-wght-normal-N43DBLU2.woff2") format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-vietnamese-wght-normal-CE5GGD3W.woff2") format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-ext-wght-normal-5SRY4DMZ.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-wght-normal-O25CN4JL.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2") format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-wght-normal-EWLSKVKN.woff2") format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-ext-wght-normal-7GGTF7EK.woff2") format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-wght-normal-N43DBLU2.woff2") format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-vietnamese-wght-normal-CE5GGD3W.woff2") format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-ext-wght-normal-HA22NDSG.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-wght-normal-NRMW37G5.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 6l16 0" />
|
||||
<path d="M8 12l8 0" />
|
||||
<path d="M6 18l12 0" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 248 B |
@@ -1,3 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 6l16 0" />
|
||||
<path d="M10 12l10 0" />
|
||||
<path d="M6 18l14 0" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 250 B |
@@ -1,3 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 6l16 0" />
|
||||
<path d="M4 12l16 0" />
|
||||
<path d="M4 18l12 0" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 249 B |
@@ -1,3 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 6l16 0" />
|
||||
<path d="M4 12l10 0" />
|
||||
<path d="M4 18l14 0" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 249 B |
@@ -1,4 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" data-slot="icon">
|
||||
<!-- Icon from Material Symbols by Google - https://github.com/google/material-design-icons/blob/master/LICENSE -->
|
||||
<path fill="currentColor" d="M4 24q-.825 0-1.412-.587T2 22t.588-1.412T4 20h16q.825 0 1.413.588T22 22t-.587 1.413T20 24zm10.6-12L12 9.4l-4 4l2.575 2.6zm-1.175-4L16 10.575L20 6.6L17.4 4zm-2.1-.725l5.4 5.4L12 17.425q-.6.6-1.412.6t-1.413-.6l-.125.1q-.275.225-.6.35T7.775 18h-3.05q-.35 0-.487-.3t.112-.55l2.3-2.275q-.6-.6-.625-1.438T6.6 12zm0 0L16 2.6q.6-.6 1.413-.6t1.412.6l2.6 2.575q.6.6.6 1.413T21.425 8l-4.7 4.675z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M12.5 5.5l4 4" />
|
||||
<path d="M4.5 13.5l4 4" />
|
||||
<path d="M21 15v4h-8l4 -4z" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 336 B |
@@ -1,3 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M5.12 14L7.5 7.67L9.87 14M6.5 5L1 19h2.25l1.12-3h6.25l1.13 3H14L8.5 5h-2M18 7l-5 5.07l1.41 1.43L17 10.9V17h2v-6.1l2.59 2.6L23 12.07L18 7Z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5" />
|
||||
<path d="M4 13h7" />
|
||||
<path d="M18 9v6" />
|
||||
<path d="M21 12h-6" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 295 B |
@@ -1,3 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M5.12 14L7.5 7.67L9.87 14M6.5 5L1 19h2.25l1.12-3h6.25l1.13 3H14L8.5 5h-2M18 17l5-5.07l-1.41-1.43L19 13.1V7h-2v6.1l-2.59-2.6L13 11.93L18 17Z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5" />
|
||||
<path d="M4 13h7" />
|
||||
<path d="M21 12h-6" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 270 B |