Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML button for non-admin users #483

Closed
fvwanja opened this issue Jan 4, 2024 · 2 comments
Closed

HTML button for non-admin users #483

fvwanja opened this issue Jan 4, 2024 · 2 comments
Labels

Comments

@fvwanja
Copy link

fvwanja commented Jan 4, 2024

Description

Since #129 we have a checkbox in each Redactor field, that let's us choose, whether the "HTML" button should be visible for non-admin users or not (see screenshot). 👍

Screenshot 2024-01-04 at 14 16 49

I just made a website for a client and have now received a request that another user group should also have access to the "HTML" button function. Now I have to go through all 57 Redactor fields manually to make that change. I also don't have the possibility of setting the authorisation for one or more user groups. It is only possible to select administrators or non-administrators. 😥

@andris-sevcenko stated in #129 (comment), that the user could then just edit the HTML via the inspector. Yeah well. We can hack ourselves if we wanted to but I don't see that as an argument that should count since Redactor eating whatever HTML we feed it, is a matter of validation: I even declare which arguments, styles and elements I want to keep in my Redactor configuration file (config/redactor/foo.json). Shouldn't that prevent any manual manipulation that does not follow the rules? 🙈

How about a command for the command line, something like:

./craft  redactor/allow-html-for-admin-users-only
./craft  redactor/allow-html-for-non-admin-users

that could switch all 57 redactor fields at once!? It would really make things so much easier 🙏

🙂 Merci 👍

Steps to reproduce

  1. Create a redactor field
  2. Ticket the Checkbox Show the “HTML” button for non-admin users

Additional info

  • Craft version: 4.5.14
  • PHP version: 8.2.0
  • Database driver & version: MySQL 5.7.39
  • Plugins & versions: Redactor 3.0.4
@fvwanja fvwanja added the bug label Jan 4, 2024
@fvwanja
Copy link
Author

fvwanja commented Jan 4, 2024

Provided the project uses .yaml files, another solution could be to search for showHtmlButtonForNonAdmins: false in all .yaml files and replace it with showHtmlButtonForNonAdmins: true and then running

./craft project-config/apply

🫠

@fvwanja
Copy link
Author

fvwanja commented Sep 26, 2024

„Dieses Plug-in wird nicht mehr weiterentwickelt. Der Entwickler empfiehlt, stattdessen CKEditor zu verwenden.”

@fvwanja fvwanja closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant