Skip to content
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

Use the official API method for disabling settings #13

Open
jjspace opened this issue Feb 23, 2021 · 0 comments
Open

Use the official API method for disabling settings #13

jjspace opened this issue Feb 23, 2021 · 0 comments

Comments

@jjspace
Copy link
Contributor

jjspace commented Feb 23, 2021

Back when I added settings for specific whitespace characters there was not an official way to disable settings so I used this css hack and created a request on their API github https://github.com/obsidianmd/obsidian-api/issues/8

  .plugin-cm-show-whitespace-disabled {
    opacity: 0.6;

    .checkbox-container {
      cursor: not-allowed;
      // this is *not* an adequate way to disable an input but it's all we can do right now
      pointer-events: none;
    }
  }

There is now an official way in the API to disable a setting using setDisabled on both Setting and Component level. This section should be updated to use the new method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant