Coder Social home page Coder Social logo

filament-forms-tinyeditor's Introduction

Filament Forms TinyEditor

MohamedSabil83

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Filament Forms TinyEditor is a package for Laravel Filament that wraps TinyMce Editor into a usable component. It's works with Filament Forms standalone too.

Light mode Dark mode
Light example Dark example

Compatibility

Filament Version Package Version
3.x 2.x
2.x 1.x

Documentation

See the documentation for detailed installation instructions and usage details.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

filament-forms-tinyeditor's People

Contributors

alexbirtwell avatar ap1969 avatar brendolor avatar chosten avatar dependabot[bot] avatar dood- avatar flyingeek avatar furkangm avatar github-actions[bot] avatar guilebc avatar halilcagriakkuzu avatar heloufir avatar howdu avatar majdghithan avatar maxjustus avatar mileswucode avatar minhkhoablieu avatar mohamedsabil83 avatar nguyentranchung avatar pindagus avatar poldixd avatar raugadh avatar saifallak avatar sweebee avatar volkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filament-forms-tinyeditor's Issues

tinymce.min.js script load twice

tinymce.min.js script load twice

  • One time from provider.
  • Second time from blade component.

Script should load once and only when it is used.

[Bug]: No dark mode error

What happened?

When disabling dark mode in a panel, the editor does not load since it can't find a default value for "theme", it should default to "light".

File:
vendor/mohamedsabil83/filament-forms-tinyeditor/resources/views/tiny-editor.blade.php
Line:
24

image

How to reproduce the bug

Disable dark mode and it will fail loading:

public function panel(Panel $panel): Panel { return $panel ->default() ... ->darkMode(false) ... }

Package Version

2

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: Image saved in db doesn't work while edit works

What happened?

I'm trying to upload image using:
TinyEditor::make('content') ->fileAttachmentsDisk('local') ->fileAttachmentsVisibility('public') ->fileAttachmentsDirectory('public')

Path saved in db is: ../../storage/ while it needs to be either /storage or ../../../storage.
I'm using Laravel 10 and filament v3.

Is this expected, or I need to adjust path before saving in database?
P.S. When using edit feature, it correctly uploads and saves as : ../../../storage.

Thank you!

How to reproduce the bug

When I upload image in tinymce text editor it saves wrong path in database, while on edit works as expected.

Package Version

2.1

PHP Version

8.2

Laravel Version

10

Which operating systems does with happen with?

Windows

Notes

No response

Error when displaying image on s3 disk

What happened?

Hello, the error is the following: When an image is uploaded to the s3 disk, it is displayed perfectly while it is in the window. But, once the record is saved and the window is refreshed, the image does not appear.

image

How to reproduce the bug

This is the code in the Filamenphp Resource

image

And that in console

image

Any help?

Package Version

1.7.5

PHP Version

8.1.10

Laravel Version

9.48.0

Which operating systems does with happen with?

No response

Notes

I am using filamentphp v2

[Bug]: not work required check

What happened?

after add code : TinyEditor::make('text')->required(), - and after write text into editor - i get error : field is required. But text exist in editor

image

How to reproduce the bug

after add code : TinyEditor::make('text')->required(), - and after write text into editor - i get error : field is required. But text exist in editor

Package Version

2

PHP Version

8.2

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: Filament header goes over TinyEditor in fullscreen mode

What happened?

When going to full screen, filament header places over the editor:
image

How to reproduce the bug

  1. open full screen

Package Version

v1.7.1

PHP Version

8.2.0

Laravel Version

v9.52.5

Which operating systems does with happen with?

Windows

Notes

No response

[Bug]: Too many localization asset files

What happened?

Hello!

First of all, thank you for your great effort and awesome TinyMCE plugin.

I have more a question rather than a bug:

Is there a way to reduce the number of publicated assets, especially lang files ?

To be honest, I dont need all of them. The "eng" will be enough.

Can you provide a solution to optimize publishing?

Thanks!

How to reproduce the bug

php artisan vendor:publish --tag="filament-forms-tinyeditor-assets"

expected behaviour:

the number of lang files reduced.

Package Version

1.7.3

PHP Version

8.1

Laravel Version

10.0

Which operating systems does with happen with?

No response

Notes

No response

[Bug]:

What happened?

Not a bug but I cant request feature. Thanks for the great package

Missing in the doc if using filament forms standalone include this step.
php artisan vendor:publish --tag="filament-forms-tinyeditor-assets"
Also if using filament forms standalone skip step:
php artisan filament:assets

How to reproduce the bug

Install on standalone filament forms using steps.

Package Version

2.0.0

PHP Version

8.1

Laravel Version

9.0.0

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: TinyEditor when drag

What happened?

When I drag a block that contains TinyEditor inside the Builder\Block , TinyEditor loses its content an focus and I am unable to edit it.

How to reproduce the bug

i dont know

Package Version

2.14

PHP Version

8.2

Laravel Version

9.0

Which operating systems does with happen with?

No response

Notes

can you help

Cannot focus textarea field in Tinymce modal

Steps to reproduce:

  1. Use Tinymce plugins: code and/or codesample
  2. Create form which fires in modal
  3. Click in Tinymce on icon to use this option
  4. In opened modal, textarea field is not focusable. You cannot select text or edit it.

I believe this is connected with this: tinymce/tinymce#5169 or this: froala/react-froala-wysiwyg#122 (comment) and the solution would be using this code on Tinymce instance:

$(document).on('focusin', function(e) {
  if ($(e.target).closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {
    e.stopImmediatePropagation();
  }
});

Unfortunately I couldn`t figure this out.

[Bug]: Problem with loading the tinymce.min.js asset

What happened?

Filament should load the tinymce.min.js asset. But I'm getting a 404 error.

Bildschirm­foto 2023-03-23 um 21 08 20

How to reproduce the bug

When you install your plugin in filament and you go to the page where the editor is included.

Package Version

1.7.1

PHP Version

8.2.4

Laravel Version

10.4.1

Which operating systems does with happen with?

macOS

Notes

Maybe the error is here: https://github.com/mohamedsabil83/filament-forms-tinyeditor/blob/main/src/FilamentFormsTinyeditorServiceProvider.php#L45

If you change the path to…

'filament-forms-tinyeditor' => asset('vendor/mohamedsabil83/filament-forms-tinyeditor/resources/dist/tinymce/tinymce.min.js'),

… filament will find the right asset file and send it to the browser. In this function filament checks if the asset file exists in the composers vendor directory. If the file is not exists, filament will throw a 404.

[Bug]: [v1.7.5] Uncaught SyntaxError: expected expression, got '<'

What happened?

JS errors in the TinyMCE version used in v1.7.5 - had to use that version because v2+ requires Filament v3 and I am on a v2 repo.

Screenshot 2023-08-10 at 11 43 58

How to reproduce the bug

  • Use a Filament v2 panel
  • composer require mohamedsabil83/filament-forms-tinyeditor:^1.7.5

Package Version

1.7.5

PHP Version

8.2

Laravel Version

8.83.27

Which operating systems does with happen with?

No response

Notes

Probably will postpone the need for this until I can just upgrade to V3, but any other lingering v2 users may also have this issue.

Uploaded image not deleted

Hi,

when i upload image and then delete the record. the image still exists in the storage. any help?

thank you in advance

[Bug]:

What happened?

When the record containing the text is deleted or the photo in the text is removed from it, the photo file remains but it should be deleted.
Maybe the photos and files that are being uploaded could be managed with spatie/medialibrary - would be so much better.

How to reproduce the bug

just add and remove the photo

Package Version

2

PHP Version

8.2

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: Px instead of Pt

What happened?

How can I select px instead of pt in the editor?

How to reproduce the bug

I don't want to use the font size in pt, I want to select pixels.

Package Version

1.7

PHP Version

8.0

Laravel Version

8

Which operating systems does with happen with?

macOS

Notes

No response

[Bug]: Uncaught TypeError: Cannot read properties of null (reading 'setAttribute')

What happened?

Javascript errors occured after opening the table properties window.

How to reproduce the bug

Draw a table > Open Table Properties

Package Version

^1.7

PHP Version

8.1.15

Laravel Version

^9.19

Which operating systems does with happen with?

No response

Notes

I'm not sure whether it's got anything to do with Alpine Focus, because I did a quick console.log and noticed

e.target.container.closest('.filament-modal').setAttribute('x-trap.noscroll', 'false')

e.target.container.closest('.filament-modal').setAttribute('x-trap.noscroll', 'isOpen')

e.target.container.closest('.filament-modal') is returning null

[Bug]: cannot see editor in page

What happened?

schema([ TinyEditor::make('content')->simple(), TextInput::make('name234') ]); } this is my code and i am trying to use tiny editor here but i cannot see the tab only to use the tiny editor ![Screenshot (82)](https://github.com/mohamedsabil83/filament-forms-tinyeditor/assets/133767986/685150fd-a841-48f3-8236-995872b3b98c) ### How to reproduce the bug so i cannot see the editor in my page i don't know what to do ![Screenshot (82)](https://github.com/mohamedsabil83/filament-forms-tinyeditor/assets/133767986/63aa08fa-7583-4be2-9cb4-79a48c34b75b) ![Screenshot (83)](https://github.com/mohamedsabil83/filament-forms-tinyeditor/assets/133767986/545e8a99-397a-4d9b-8567-a46667f57e8b) ### Package Version latest ### PHP Version 802.4 ### Laravel Version 10. ### Which operating systems does with happen with? Windows ### Notes _No response_

Not compatible with panel spa ->spa()

What happened?

I entered the edit or create records page but the editor will not be shown

How to reproduce the bug

use ->spa() on the panel

Package Version

2

PHP Version

8.1

Laravel Version

10.10

Which operating systems does with happen with?

macOS, Windows, Linux

Notes

No response

[Bug]: TinyEditor field does not appear on production machine

What happened?

When I commit and pull to my production machine, the TinyEditor fields do not appear. There is space on the screen for them, but they are just blank. (I ran composer update after installation)

Is it possible that I have not some of the assets needed to display the fields?

How to reproduce the bug

I can't see the TinyEditor field on my production machine.

``

Package Version

1.7.5

PHP Version

8.1.7

Laravel Version

10.18.0

Which operating systems does with happen with?

Linux

Notes

No response

Uploaded images are not stored in storage until focus is switched

Uploaded images are not saved to storage unless you switch focus from image to text and back to image.

To clarify, this happens when you paste an image from the clipboard.

First, the base64 code of the image is inserted into the html code, after switching focus from image to text and back, the file is uploaded to the server and the base64 code is replaced with a link.

I would like the upload to the server to start immediately after inserting the image from the buffer.

[Bug]: Undefined variable $getHintAction

What happened?

PHP 8.2.11
Laravel 10.29.0
Filament 3.0.85
filament-forms-tinyeditor 2.0.9

I installed and changed the standard Filament's RichEditor (RichEditor works fine) to TinyEditor I get this error:

Undefined variable $getHintAction

[resources / views / vendor / filament-forms-tinyeditor / tiny-editor.blade.php 

How to reproduce the bug

just install it and try to use it as described in the docs

Package Version

2.0.9

PHP Version

8.2.11

Laravel Version

10.29.0

Which operating systems does with happen with?

macOS

Notes

No response

[Bug]: Editor in modal break when opened second time

What happened?

CleanShot 2023-08-18 at 11 18 49

How to reproduce the bug

  • Create an action with modal form.
  • Add TinyEditor field inside it.
  • Open the modal. it will work as expected.
  • Close the modal, and then open again.
  • TinyEditor field doesn't work

Package Version

2.0.1

PHP Version

8.1.22

Laravel Version

10.19.0

Which operating systems does with happen with?

macOS

Notes

No response

Uncaught SyntaxError: expected expression, got '}'

Pacakge version v1.6.6 seems to introduce a bug (which i dont have in v1.6.5 !) :

Alpine Expression Error: expected expression, got '}'

Expression: "(() => {
            window.addEventListener('DOMContentLoaded', () => initTinymce());
            $nextTick(() => initTinymce());
            const initTinymce = () => {
                if (window.tinymce !== undefined && initialized === false) {
                    tinymce.init({
                        target: $refs.tinymce,
                        language: 'en',
                        skin: typeof theme != 'undefined' ? theme : 'light',
                        content_css: this.skin === 'dark' ? 'dark' : '',
                        max_height: 0,
                        menubar: true,
                        plugins: ['advlist autoresize codesample directionality emoticons fullscreen hr image imagetools link lists media table toc wordcount'],
                        toolbar: 'undo redo removeformat | formatselect fontsizeselect | bold italic | rtl ltr | alignjustify alignright aligncenter alignleft | numlist bullist | forecolor backcolor | blockquote table toc hr | image link media codesample emoticons | wordcount fullscreen',
                        toolbar_mode: 'sliding',
                        relative_urls: true,
                        remove_script_host: true,
                        convert_urls: true,
                        branding: false,
                        images_upload_handler: (blobInfo, success, failure, progress) => {
                            if (!blobInfo.blob()) return

                            $wire.upload(`componentFileAttachments.data.content`, blobInfo.blob(), () => {
                                $wire.getComponentFileAttachmentUrl('data.content').then((url) => {
                                    if (!url) {
                                        failure('Error uploading file')
                                        return
                                    }
                                    success(url)
                                })
                            })
                        },
                        automatic_uploads: true,
                        templates: [],
                        setup: function(editor) {
                            editor.on('blur', function(e) {
                                state = editor.getContent()
                            })

                            editor.on('init', function(e) {
                                if (state != null) {
                                    editor.setContent(state)
                                }
                            })

                            editor.on('OpenWindow', function(e) {
                                e.target.container.closest('.filament-modal').setAttribute('x-trap.noscroll', 'false')
                            })

                            editor.on('CloseWindow', function(e) {
                                e.target.container.closest('.filament-modal').setAttribute('x-trap.noscroll', 'isOpen')
                            })

                            function putCursorToEnd() {
                                editor.selection.select(editor.getBody(), true);
                                editor.selection.collapse(false);
                            }

                            $watch('state', function(newstate) {
                                // unfortunately livewire doesn't provide a way to 'unwatch' so this listener sticks
                                // around even after this component is torn down. Which means that we need to check
                                // that editor.container exists. If it doesn't exist we do nothing because that means
                                // the editor was removed from the DOM
                                if (editor.container && newstate !== editor.getContent()) {
                                    editor.resetContent(newstate || '');
                                    putCursorToEnd();
                                }
                            });
                        },
                        ...
                    });
                    initialized = true;
                }
            }

            // We initialize here because if the component is first loaded from within a modal DOMContentLoaded
            // won't fire and if we want to register a Livewire.hook listener Livewire.hook isn't available from
            // inside the once body
            if (!window.tinyMceInitialized) {
                window.tinyMceInitialized = true;
                $nextTick(() => {
                    Livewire.hook('element.removed', (el, component) => {
                        if (el.nodeName === 'INPUT' && el.getAttribute('x-ref') === 'tinymce') {
                            tinymce.get(el.id)?.remove();
                        }
                    });
                });
            }
        })()"

Using server side file/image browser

It's not a bug report, but the other options were not working for me.

What I would like to do is use a server side file/image browser (e.g. https://unisharp.github.io/laravel-filemanager/) to insert images. How can I achieve that? So far I managed to show the media browser, but selecting any file does not have any affect, does not display the image in my text.

Thanks in advance.

[Bug]: Cannot focus on field inside TinyEditor toolbox modal

What happened?

CleanShot.2023-09-27.at.15.09.50.mp4

How to reproduce the bug

  • Create an action with modal form.
  • Add TinyEditor field inside it.
  • Open the modal.
  • Click Link 🔗 toolbox
  • New modal with some field will appear
  • Click the field, it wont focus on the clicked field

Package Version

2.0.4

PHP Version

8.1.22

Laravel Version

10.25.0

Which operating systems does with happen with?

macOS

Notes

No response

[Bug]: Editor in nested repeater breaks after changing the order

What happened?

In a situation where the editor is embedded in a nested repeater field that has a sorting option, after changing the order of the elements, the editor breaks (the content in it disappears and the content area becomes inactive - you can't click on it and write). It seems that it is not being re-initialized correctly.

An example of a form configuration that causes this error:

Repeater::make('questions')
    ->label('FAQ categories')
    ->createItemButtonLabel('Add category')
    ->orderable()
    ->collapsible()
    ->schema([
        TextInput::make('category')
            ->required(),
            
        Repeater::make('questions')
            ->collapsible() 
            ->orderable()
            ->schema([
                TextInput::make('question')
                    ->required(),

                TinyEditor::make('answer')
                    ->required(),
            ])
            ->columns(2)                
    ])
    ->columns(2);

How to reproduce the bug

As above

Package Version

1.5

PHP Version

8.1.13

Laravel Version

9.19

Which operating systems does with happen with?

Windows

Notes

No response

[Bug]: Copy-paste bullet points not working correctly in Chrome Browser

What happened?

I trying to copy and paste bullet pointed text from MS Word , but it does not work but if I copy-paste from GoogleDocs or Pages in MacOS it works well.

How to reproduce the bug

  • Copy any bulleted text in MS Word
  • Try to paste it in editor form

Package Version

2.0

PHP Version

8.2.0

Laravel Version

10.31.0

Which operating systems does with happen with?

Windows

Notes

I googled for the problem but there only says that need to buy some premium version of tiny mce.

[Bug?]: Overriding em and strong to i and b gets re-overridden when saving

What happened?

I’m not sure if this is a bug here or in TinyMCE itself (if at all) – I don’t have a full TinyMCE install anywhere to test with.

For semantic reasons (and for reasons of CSS styling), I don’t want my editor to use <em> and <strong> for italicised and bolded text, so I’ve added the following to override TinyEditor to use <i>  and <b> instead, based on the formats documentation:

'profiles' => [
  'base' => [
    'custom_configs' => [
      'formats' => [
        'bold' => [
          [
            'inline' => 'b',
            'remove' => 'all'
          ],
          [
            'inline' => 'strong',
            'remove' => 'all'
          ]
        ],
        'italic' => [
          [
            'inline' => 'i',
            'remove' => 'all'
          ],
          [
            'inline' => 'em',
            'remove' => 'all'
          ]
        ]
      ]
    ],
  ],
]

I expected this to consistently convert all <strong> and <em> tags/elements to <b> and <i> tags/elements, respectively, both when viewing, editing and saving using TinyEditor, and when I’m editing text in the editor now, the correct tags are in fact used: the indicator at the bottom shows P » B instead of P » STRONG, and when I inspect the actual element in the browser, I can confirm that it is a <b> element, not a <strong> element.

But as soon as I save the resource, the <i> and <b> tags are transformed into <em> and <strong> tags again, so when I reload the page after saving, the same element that was <b> before is now suddenly a <strong> element.

How to reproduce the bug

Add formats overrides as per above and use the Bold and Italic functionality to format it. Confirm that the status bar at the bottom of the editor correctly says P » I/B. Save the Filament resource you’re editing and reload the page, and the formatting has been reset to P » EM/STRONG.

Package Version

1.7.4

PHP Version

8.1.12

Laravel Version

9.52.10

Which operating systems does with happen with?

macOS, Windows

[Bug]: file picker not found

What happened?

I have a problem when trying to add an upload files to the link I add:
file_picker_types: 'file image media',
file_picker_callback: (callback, value, meta) =>{ ...},

but this doesn't add the upload to the filepicker

How to reproduce the bug

php artisan vendor:publish --tag="filament-forms-tinyeditor-config"

add

'profiles' => [

    'default' => [
        'plugins' => 'advlist autoresize codesample directionality emoticons fullscreen hr image link lists media table wordcount',
        'toolbar' => 'undo redo removeformat | formatselect fontsizeselect | bold italic | rtl ltr | alignjustify alignright aligncenter alignleft | numlist bullist | forecolor backcolor | blockquote table hr | image link media codesample emoticons | wordcount fullscreen',
        'upload_directory' => null,
        'custom_configs' => [
            'file_picker_types' => 'file image media',
            'file_picker_callback' => '(callback, value, meta) =>{ ...}',
        ],
    ], ...

Package Version

1.7.4

PHP Version

8.2

Laravel Version

10.13.5

Which operating systems does with happen with?

Linux

Notes

No response

We can not edit the source code in popup

Hello,

we added the plugin code (in plugins and toolbar config - default profile).

Although the button appeared and we are able to click it, in the popup we are unable to edit the source code. It seems like a css bug.

[Bug]: Bug with spatie translatable

What happened?

after switch language editor can't be opened
image

How to reproduce the bug

Switch language to another

Package Version

lates

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

macOS, Windows, Linux

Notes

No response

[Bug]: field is cleared when it's a part of a component with drag and drop option

What happened?

When TinyEditor used inside a Builder or Repeater Filament component and I drag and drop it the TinyEditor field cleared and can't be edit.

How to reproduce the bug

Make a Filament Form, put inside Repeater Component and use TinyEditor in this Component. Next make some repeated fields of the Repeater, put some text inside and try to change thier order.

Package Version

1.7.4

PHP Version

8.1

Laravel Version

9

Which operating systems does with happen with?

Linux

Notes

Moving the iFrame editor around the DOM is not supported in Tiny. They offer to use remove() and init() instead

Editor doesn't render in Firefox

Here is the form schema:

 public static function getFormSchema(): array
    {
        return [
            Card::make()
                ->schema([
                    Forms\Components\FileUpload::make('image')->image()->maxSize(4096)->label('Avatar'),
                    TinyEditor::make('content'),
                    TextInput::make('author_name')->required(),
                    TextInput::make('author_listings')->required(),
                ]),
        ];
    }

The field is rendered correctly in Chrome, however, it doesn't load in Firefox:

image

[Bug]: Images upload bug on creating post

What happened?

If I upload an image in the editor when creating a post, I have a problem that the path to the image starts with this "./../storage/upload/", but it should be "/storage/upload/".
If I open the post for editing and re-upload the file in the editor, it works fine.
This means that I have a problem only when creating a post.

How to reproduce the bug

I sue this construction
TinyEditor::make('content')
->fileAttachmentsDisk('local')
->fileAttachmentsVisibility('storage')
->fileAttachmentsDirectory('public/uploads')

Package Version

1.7.2

PHP Version

8.2.3

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: direction doesn't change when locale change using spatie-laravel-translatable-plugin ( for RTL languages)

What happened?

I use spatie-laravel-translatable-plugin that is responsible for language translations.
I use Arabic (RTL) and English (LTR).

However the direction stays same as the Layout language not the language of the translation package.

How to reproduce the bug

use spatie-laravel-translatable-plugin
make model field translatable by the spatie laravel package
use ar and en for the package

use TinyEditor in the form fields for the translatable field
change the language using the LocaleSwitcher action button

direction doesn't change for ar or en. It just keeps as the Panel Layout language direction.

Package Version

2.0

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

macOS

Notes

I used to use Voyager Admin Panel and I override the directionality: 'rtl | ltr' using js when the language change and rebuild the tinyMCE editor on every click to language switcher.
However filament uses A different world with livewire and alpine witch I find harder to customize (for now at least).

Thank you.

Undefined variable $getHintAction

I get an error "Undefined variable $getHintAction" when trying to use in Filament admin panel.

The editor is being use like the below:

TinyEditor::make('body')->height(900)->required()->label('Editor')->reactive()

Commenting out the lines below in tiny-editor.blade.php fixes the issue.

:hint-action="$getHintAction()"
:hint-color="$getHintColor()"
:hint-icon="$getHintIcon()" 

[Help Wanted]: Converting image

What happened?

I have a problem with the file upload, I want to convert the image to webp but I can't change the source code. Is there an easy way?

How to reproduce the bug

I want to add this: images_upload_url: '/convert',

Package Version

Current

PHP Version

8.1.0

Laravel Version

10.0.0

Which operating systems does with happen with?

macOS

Notes

No response

[Bug]: Data is not saved

What happened?

Data is not saved in the tinyeditor field.

How to reproduce the bug

  1. Make a change to the tinyeditor field
  2. Click the Save button (if you remove focus from the tinyeditor field, the data will be saved successfully)

Package Version

v2.0.5

PHP Version

8.2.10

Laravel Version

10.22

Which operating systems does with happen with?

No response

Notes

filament 3.0.63


protected function getFormActions(): array
{
    return [
        $this->getSaveFormAction(), // don't work
        ...
    ];
}	

// original 
protected function getSaveFormAction(): Action
{
	  return Action::make('save')
	      ->label(__('filament-panels::resources/pages/edit-record.form.actions.save.label'))
	      ->submit('save') // THIS problem
	      ->keyBindings(['mod+s']);
}

// custom 
 protected function getSaveFormAction(): Action
  {
      return Action::make('save')
          ->action(function(){
              $this->save(); // its work
          });
  }


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.