-
Notifications
You must be signed in to change notification settings - Fork 0
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
Default Options to match Full HTML text format in Drupal #3
Comments
Many thanks for adding this info. However, instead of patching the original module, it's actually better to do these changes in a custom module in hook_tinymcebackport_options_alter() Like: function YOURMODULE_tinymcebackport_options_alter(array &$options, $format) {
$options['plugins'] = 'lists link image autoresize imgalign table ...';
// ... All your other changes
} I know, the documentation re that is a bit sparse, only the API file. 😉 |
Excellent! I have to admit I got in a hurry and barely looked at the API file. Will implement that now in my own solutions. Thanks for the module! |
Thank you. The example for a custom module is a helpful start and requires more work to make it work as expected if user wants to switch between filtered and full input formats. |
Maybe you want to share some of your findings? 😉 If you have helpful hints... I just created this module to have a solution for an immediate problem - to have a supported editor for my remaining D7 sites after ckeditor has been deprecated. But as D7 will be EOL soon, I didn't put too much effort in admin convenience. 🙈 |
Sure, I'm happy to share my findings. Using the Tinymcebackport module by itself, a role with permission to use both filtered and full formats: while creating content selecting "Filtered HTML" shows the TinyMCE toolbar, and selecting "Full HTML" displays as plain text with no toolbar as one would expect. When the custom module is added and enabled: while creating content selecting "Filtered HTML" or "Full HTML" displays the TinyMCE full toolbar, rather than the simple toolbar for "Filtered HTML" and full toolbar for "Full HTML". |
Ah, get it. The example module enables the editor on both. If, however, one wants it only on full_html and not on filtered_html, one could do instead:
And here's an example from an older site, which was upgraded from D6 (hence the numeric format name):
|
The further example you provide does show it on |
This is not really an issue, but I just thought I would put it out there in case anyone was interested. These are the changes I made to the default options in _tinymcebackport_get_default_options() so it would closely match (as best I could) the Full HTML text format in Drupal.
Replace this section:
with this:
The text was updated successfully, but these errors were encountered: