1

Is there a way to adjust Special Characters plugin's list of characters in Redactor settings (or in other config file)?

I can make the changes I need (reduce plugins menu, add new characters) directly to specialcharacters.js. But this change vaporize with updates :-(

Can't find any documentation neither here nor the imperavis's website.

Anyone have some experience with redactor's plugin settings?

1

As per the documentation, you can store your own plugins in the directory /config/redactor/plugins/. It isn't specifically mentioned, but plugins stored in the config directory take precedence before the bundled plugins. So you can overwrite any of the bundled plugins by copying them to that directory and modifying them there. This also allows you to put the modified plugins under version control, and they will persist through updates.

  1. Grab the original specialchars plugin from here. You can also use the version bundled with the craftcms/redactor library, but that one is already minified, so it's harder to modify.
  2. Copy the file specialchars.js to /config/redactor/plugins/specialschars.js.
  3. If you haven't done so already, add the specialchars plugin to the list of active plugins in your redactor config file.

Now you can modify the plugin however you like, the redactor field will use the modified plugin from your config folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.