Line length toggle follow ups
Follow up from https://github.com/nextcloud/text/pull/6569
- [ ] Hide the toggle for line length in collectives as it has its own option
- [ ] Discuss if moving the toggle to the action menu makes sense
- Feedback from @jancborchardt
I would expect a setting like this to be in the collapsed part of the toolbar along with these other more info/settings like items, as the "people" menu is more focused on collaboration and sharing. (Also, this setting is disabled by default, right?)
- Feedback from @jancborchardt
In collectives this is a per page setting. So hiding makes sense to avoid conflicts.
Tackling the second part in #7514.
I'm unsure how best to achieve the hiding in collectives though.
- We could hide it everywhere where
createEditoris used - but that seems too generic. - Collectives could specify a parameter to
createEditor. - Collectives could provide some data that we inject in the Editor that hides the toggle.
Alternatively we could make the toggle work on the collectives per page setting - but I wonder if that would be more confusing or less.
I'm unsure how best to achieve the hiding in collectives though.
I think we want to further customize the toolbar options in Text via editorApi (createEditor()) in the future, e.g. to add "Link page" as first option in the link submenu and remove/change "Link file".
I'm not sure about the best approach either, but exposing the configurability in the API at editor.js sounds like the right approach to me. Probably for a simple show/hide option, a flag passed to createEditor() is the most straight forward solution? 🤔
I found a different way (https://github.com/nextcloud/text/pull/7514/commits/f8ee19440106ceb93a4b7efbc0d9e807ffa870d9): Text now detects the width has already been set and does not render the width toggle anymore.
Very nice! Then I'd say this issue can be closed once #7514 got merged, right?