Skip to content

Commit

Permalink
fix: tip tap config (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio authored Nov 23, 2024
1 parent 2cf9935 commit ae23f72
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions config/filament-tiptap-editor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php

declare(strict_types=1);

return [
'direction' => 'ltr',
'max_content_width' => '5xl',
'disable_stylesheet' => false,
'disable_link_as_button' => false,

/*
|--------------------------------------------------------------------------
| Profiles
|--------------------------------------------------------------------------
|
| Profiles determine which tools are available for the toolbar.
| 'default' is all available tools, but you can create your own subsets.
| The order of the tools doesn't matter.
|
*/
'profiles' => [
'default' => [
'heading', 'bullet-list', 'ordered-list', 'checked-list', 'blockquote', 'hr', '|',
'bold', 'italic', 'strike', 'underline', 'superscript', 'subscript', 'lead', 'small', 'color', 'highlight', 'align-left', 'align-center', 'align-right', '|',
'link', 'media', 'oembed', 'table', 'grid-builder', 'details', '|', 'code', 'code-block', 'source', 'blocks',
],
'simple' => ['heading', 'hr', 'bullet-list', 'ordered-list', 'checked-list', '|', 'bold', 'italic', 'lead', 'small', '|', 'link', 'media'],
'minimal' => ['bold', 'italic', 'link', 'bullet-list', 'ordered-list'],
'none' => [],
],

/*
|--------------------------------------------------------------------------
| Actions
|--------------------------------------------------------------------------
|
*/
'media_action' => FilamentTiptapEditor\Actions\MediaAction::class,
// 'media_action' => Awcodes\Curator\Actions\MediaAction::class,
'edit_media_action' => FilamentTiptapEditor\Actions\EditMediaAction::class,
'link_action' => FilamentTiptapEditor\Actions\LinkAction::class,
'grid_builder_action' => FilamentTiptapEditor\Actions\GridBuilderAction::class,

/*
|--------------------------------------------------------------------------
| Output format
|--------------------------------------------------------------------------
|
| Which output format should be stored in the Database.
|
| See: https://tiptap.dev/guide/output
*/
'output' => FilamentTiptapEditor\Enums\TiptapOutput::Html,

/*
|--------------------------------------------------------------------------
| Media Uploader
|--------------------------------------------------------------------------
|
| These options will be passed to the native file uploader modal when
| inserting media. They follow the same conventions as the
| Filament Forms FileUpload field.
|
| See https://filamentphp.com/docs/3.x/panels/installation#file-upload
|
*/
'accepted_file_types' => ['image/jpeg', 'image/png', 'image/webp', 'image/svg+xml', 'application/pdf'],
'disk' => 'public',
'directory' => 'images',
'visibility' => 'public',
'preserve_file_names' => false,
'max_file_size' => 2042,
'min_file_size' => 0,
'image_resize_mode' => null,
'image_crop_aspect_ratio' => null,
'image_resize_target_width' => null,
'image_resize_target_height' => null,
'use_relative_paths' => true,

/*
|--------------------------------------------------------------------------
| Menus
|--------------------------------------------------------------------------
|
*/
'disable_floating_menus' => false,
'disable_bubble_menus' => false,
'disable_toolbar_menus' => false,

'bubble_menu_tools' => ['bold', 'italic', 'strike', 'underline', 'superscript', 'subscript', 'lead', 'small', 'link'],
'floating_menu_tools' => ['media', 'grid-builder', 'details', 'table', 'oembed', 'code-block', 'blocks'],

/*
|--------------------------------------------------------------------------
| Extensions
|--------------------------------------------------------------------------
|
*/
'extensions_script' => null,
'extensions_styles' => null,
'extensions' => [],
];

0 comments on commit ae23f72

Please sign in to comment.