PKM-er / obsidian-editing-toolbar

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

Viewport visibility #130

Closed dehahost closed 5 months ago

dehahost commented 7 months ago

Is your feature request related to a problem? Please describe. It is not.

Describe the solution you'd like It would be great to have a control on which viewport (screen size) is the Editing toolbar visible or not. This could be extended with a toolbar position and so on. For example ... one could configure it so that the Editing toolbar is visible on PC, on tablet is at the bottom and on mobile phone is hidden.

Describe alternatives you've considered / Enabling Editing toolbar plugin only when using a PC. / Not using Editing toolbar plugin.

Additional context When I am taking a notes on my Android phone, I am used to the built-in editing toolbar. After the last update, I have two editing bars.

depascalis commented 6 months ago

In the meantime it should be possible to create a custom css snippet for this as a workaround using @media.

In this example the toolbar will be hidden if the width of the window is bellow 540px.

@media only screen and (max-width: 540px) {
  #cMenuToolbarModalBar {
    display: none;
  }
}

There are more @media queries you can use and combine to make it more specific, see below. https://developer.mozilla.org/en-US/docs/Web/CSS/@media

cumany commented 5 months ago

The new version has added relevant options