thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.77k stars 2.67k forks source link

Deprecated TinyMCE Toolbar #5711

Open lamualfa opened 1 year ago

lamualfa commented 1 year ago

Laravel version

9.39.0

PHP version

8.1.7

Voyager version

1.6

Database

MYSQL 8.0

Description

According to https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/#things-we-renamed, some toolbar names were renamed. And Voyager still uses one of them which is styleselect.

Steps to reproduce

Just create a Rich Text Box BREAD Field, and you'll see that the expected toolbar does not exist (styleselect).

Expected behavior

Before:

image

After:

image

Screenshots

No response

Additional context

No response

lamualfa commented 1 year ago

Temporary solution while waiting for PR https://github.com/the-control-group/voyager/pull/5712 to be merged

1. Edit the repositories field on your composer.json to:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/lamualfa/voyager.git"
    }
  ]
}

You can create a new one if the repositories field doesn't exist.

2. Edit the tcg/voyager version on your composer.json to dev-fix-5711:

{
  "require": {
    "tcg/voyager": "dev-fix-5711"
  }
}

The dev-fix-5712 means that you tell the composer to install tcg/voyager from https://github.com/lamualfa/voyager/tree/fix-5711 instead.

3. Run composer update to update the tcg/voyager package.

The final composer.json file will looks like this:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/lamualfa/voyager.git"
    }
  ],
  "require": {
    "tcg/voyager": "dev-fix-5711"
  }
}

References

igorlesovsky commented 1 year ago

Or for a specific BREAD field:

{ "tinymceOptions": { "toolbar": "styles bold italic underline | forecolor backcolor | alignleft aligncenter alignright | bullist numlist outdent indent | link image table | code | removeformat" } }