PKM-er / obsidian-editing-toolbar

An obsidian toolbar plugin, modified from the Cmenu plugin
Mozilla Public License 2.0
857 stars 30 forks source link

Option to reveal toolbar on text selection when using auto-hide (not just hover), granular control over fade-in speed, possibly modal option. #83

Open nightgolfer opened 1 year ago

nightgolfer commented 1 year ago

Thank you for a great plugin!

Is your feature request related to a problem? Please describe. I installed the extension as an alternative to cMenu, which is no longer maintained, and I am sure I'm not the only user with that particular journey. cMenu was modal, and only showed up when text was selected, which is what I wanted. As Editing Toolbar is not modal, I would like to have options to customise it and make it a bit closer to the cMenu functionality.

Describe the solution you'd like 1) I would like the toolbar to only be visible when I need it. In my case, that means when text is highlighted; when I'm typing, I prefer markdown, but markdown isn't good for working with selected text. With the current setting options, I can enable auto-hide, but this only reveals the toolbar on hover.

So I have to mark my text and then move the cursor to a hidden area and wait for the toolbar to appear. I would much prefer the toolbar to appear when I select the text in the first place, something closer to the modal experience. Only show when I need it, but show it instantly when I need it.

Also, with the current auto-hide implementation, the fade-in time is too slow in my opinion. I would prefer to be able to set the duration in milli-seconds, and have instant-reveal when fade-in time is set to 0.

2) I would prefer the toolbar to be at the bottom of the screen instead of the top. Adding this option, if possible, would be nice.

Describe alternatives you've considered My ideal solution would be an option to make the toolbar modal, appearing on text-select, close by where I select text. I would trim down the available buttons to a minimum, and have a functional plugin which closely mimics the functionality I liked from cMenu. This would solve/negate both my above suggestions.

mattmaiorana commented 1 year ago

These changes would also solve all of my issues with the plugin. Hopefully an update is possible!

mattmaiorana commented 1 year ago

It's not a perfect fix, but for anybody who stumbles across this I was able to achieve a look I'm pretty happy with via CSS snippets. I made it so it's always at the bottom (option for always at the top included as well) but fades out unless you hover over it. I didn't like the full bar at the top, so this is sort of a middle ground between all of the options. I wanted something small that is there when I need it but most of the time gets out of the way.

I also hid the status bar icon as I don't need it with this setup.

/ PLUGIN EDITS: EDITING TOOLBAR Adjust toolbar style to move lower and have it fade in/out. Hide status bar icon. /

/* Version with toolbar at top of note

cMenuToolbarModalBar {

opacity: 0; transition: .2s; bottom: auto !important; top: 4.75em; } */

cMenuToolbarModalBar {

opacity: 0; transition: .4s; bottom: 1.25em !important; }

cMenuToolbarModalBar:hover {

opacity: 1; }

.cMenuToolbar-statusbar-button { display: none; }