backdrop-contrib / tinymce

Integration for the TinyMCE editor in Backdrop CMS
https://backdropcms.org/project/tinymce
GNU General Public License v2.0
2 stars 1 forks source link

Layout configure custom block in modal, editor more extra display row needs close button or float all #21

Closed izmeez closed 11 months ago

izmeez commented 1 year ago

When in a layout and configuring a custom block in a modal the editor icons are simplified and include a more icon that toggles an extra display of icons. This extra row display floats such that if the custom block exceeds the length of the window the display is floating by itself and there is no way to toggle it off unless one scrolls back up to click on the more button.

Maybe adding a close button on this extra floating display would be a solution for when the user is done with the extra?

It also raises the question of whether the entire editor toolbar should float, remaining at the top of the content window as user scrolls down.

This may be an edge case as blocks are usually short.

indigoxela commented 1 year ago

@izmeez which editor profile are you using? I can't reproduce what you describe with any of the three defaults, and neither with one of my customs.

Can you provide a screenshot? Or maybe the configuration of your custom profile - if it's a custom profile.

izmeez commented 1 year ago

I am using the default profile with the Seven theme for admin and tested with both Firefox and Brave (Chrome variant) with same results. Attached is a screen shot. bd-tinymce-block-view-more-needs-close2

izmeez commented 1 year ago

Aggregation is on.

indigoxela commented 1 year ago

Odd, I can't reproduce.

Did you edit the profile? If so, can you provide the json export here? BTW: if you toggle the dots again, the floated toolbar closes.

However, you toolbar appears to be misplaced in the screenshot, so I'm still suspecting, it's not the original "Default" profile.

EDIT: ah, now I get it... with long content, the toolbar scrolls with content (fixed). That's regular behavior. So no bug as far as I can see.

TinyMCE provides a setting for this behavior, so if you don't like it, you can switch to another toolbar_mode, which is documented here.

And no, there's no builder tool setting for that and won't get implemented. :wink:

izmeez commented 1 year ago

Thank you for finding this and sharing the link. It explains the four options well,

Possible values: 'floating', 'sliding', 'scrolling', or 'wrap'

I am using the default profile, as it is out of the box. So it appears to be set to floating. I quite like the sliding option, but wrap would be consistent with the current ckeditor behaviour. So is there a way in the UI that this can be changed?

indigoxela commented 1 year ago

is there a way in the UI that this can be changed?

No, and I'm not planning to implement it. TinyMCE provides a load of configuration options, for almost every aspect, so it's not even possible to cover all.

izmeez commented 1 year ago

I see there are a lot of settings for TinyMCE. Just for the toolbar positioning the tinymce.init has the four settings mentioned earlier and also toolbar_sticky which can be set to true. So, if someone wanted to make any changes would it require adding an extra js file to the js folder?

indigoxela commented 1 year ago

if someone wanted to make any changes would it require adding an extra js file to the js folder?

Of course not! :smile: The JSON profiles handle that. You don't have to touch any js code, but have to edit JSON to have full control over all available options.

izmeez commented 1 year ago

Thank you for the additional information about the JSON profiles. I thought they were just for editing icons. Knowing they can be used for more I can experiment making a copy of a profile and adding to it.

I was not thinking that all the options need to be available in the UI. It just seems like some of the default behaviour may be pain points for other users and knowing how to approach them is helpful. Thank you.

indigoxela commented 11 months ago

I think, with the builder edit/delete functionality now implemented, this can be closed.