TomPich Posted February 20 Share Posted February 20 Hey, The new version of PW (3.0.244/246) is great, and it uses TinyMCE 6.8. I saw that in this version of TinyMCE, there is a plugin that manages <detail> and <summary> tags. That was not possible in TinyMCE 6.4, used in the former version of PW (3.0.224). However, this plugin is not displayed in the TinyMCE input fields configuration interface. It’s just completely ignored. It can be activated though if you add it directly in the input field config in the database and it works perfectly. So it’s just a matter of user interface to get it straight in PW. Would it be possible to take it into account in the admin interface? That means see this plugin in the plugin lists of TinyMCE, and add the "accordion" button in the tool bar. Thanks Link to comment Share on other sites More sharing options...
BrendonKoz Posted February 21 Share Posted February 21 Have you already added the plugin into the InputfieldTinyMCE's External Plugin Files section, and then configured both the module and the field to use it? I'm just wondering if the module, and then field config would take care of your manual database edit. Link to comment Share on other sites More sharing options...
TomPich Posted February 23 Author Share Posted February 23 Didn’t try it yet, no. I’ll do that and let the community know about it. Thanks for the lead. 1 Link to comment Share on other sites More sharing options...
BrendonKoz Posted Wednesday at 07:45 PM Share Posted Wednesday at 07:45 PM Hey @TomPich, I don't know if you gave it a try, but I just did. Although I was able to get the button to work after manually modifying InputfieldTinyMCEConfig.php, I wasn't able to get it to actually work using the default interface of a Textarea field's Input config for TinyMCE fields. As the Accordion plugin is not an external plugin, there doesn't seem to be a simple way to use the UI of the field's Input config settings to enable the accordion. I played around a bit, and did get it to work, but after saving the injected "accordion" (details/summary elements), the HTML of those elements got stripped via HTMLPurifier, so there's another problem. Turning off HTMLPurifier allowed it to work, though I'm not sure if you'd want to do that. There's another recent topic where someone is attempting to adjust HTMLPurifier a bit. Currently, it seems that to get the Accordion plugin to work until/unless the core TinyMCE module is updated to include it, you'd currently have to migrate your customized settings via the field's UI into a custom JSON that overrides what you have set via the field UI. Example "Custom Settings JSON" (PW default + accordion): { "plugins": ["anchor", "code", "link", "lists", "pwimage", "pwlink", "table", "accordion"], "toolbar": ["styles bold italic pwlink pwimage blockquote hr bullist numlist table anchor code accordion"] } After playing around with the accordion interface, I don't find it quite as intuitive as some other elements, but it does work. 1 Link to comment Share on other sites More sharing options...
TomPich Posted yesterday at 05:59 PM Author Share Posted yesterday at 05:59 PM Hey @BrendonKoz, Thanks for the tip. No, I haven’t tried anything yet. Been busy these last weeks. I’ll try your solution. Thanks again. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now