question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hiding Buttons doesnt work as expected

See original GitHub issue

I’m submitting a bug report

  • Library Version: 2.0.2

Please tell us about your environment:

  • Operating System: OSX 10.14.1

  • Browser: all | Chrome | Safari

  • Language: TypeScript 3.1.6

Current behavior: Unable to hide Buttons with provided options: this.editorOptions = { hiddenButtons: ['cmdUrl', 'cmdImage', 'cmdCode', 'cmdPreview']};

Disable Buttons with options works as expected: this.editorOptions = { disabledButtons: ['cmdUrl', 'cmdImage', 'cmdCode', 'cmdPreview']};

Expected/desired behavior: Hide Buttons as expected

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
CR34Lcommented, Dec 10, 2018

Want to deploy the app on 1. of January. So I have to fix this issue by my own. I think it is just a minor issue…I will check this next week. Leaving you a message on progress. Cheers!

0reactions
stefanwalthercommented, Aug 5, 2019

The best workaround I have found so far is the following:

<angular-markdown-editor
   ... options
   class="angular-markdown-editor-minimalistic"
   ... other options
></angular-markdown-editor>
.angular-markdown-editor-minimalistic {

  // See here: https://css-tricks.com/almanac/selectors/a/attribute/
  ::ng-deep [data-handler$="cmdBold"] {
    display: none;
  }

}

Using then SCSS, I am doing the following, which always works to get a minimalistic version of the markdown-editor:

.angular-markdown-editor-minimalistic {

  $disabledButtons: cmdStrikethrough, cmdImage, cmdHeading, cmdUrl, cmdListO, cmdCode, cmdQuote, cmdTable, cmdPreview;

  @each $disabledButton in $disabledButtons {

    // See here: https://css-tricks.com/almanac/selectors/a/attribute/
    ::ng-deep [data-handler$="#{$disabledButton}"] {
      display: none;
    }
  }

}

Not ideal, but a well working workaround 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't my CSS hiding my button as expected? [closed]
3 Answers 3 · Edit the page with Elementor on which Widget that you want to hide. · Select the Section that you...
Read more >
show hide buttons don't work!! - CreativePro Network
That is as expected but when I click on the trigger button it dims slightly and nothing else happens, the target does not...
Read more >
Show hide button does not fully work, Word 2007
The first step, before doing what Graham said, is to turn off the Show/Hide button (which also unchecks the "Show all formatting marks"...
Read more >
Ribbon Workbench doesn't work when trying to hide a Ribbon ...
Right - I see the issue. You have hidden the button but it is also defined in the customisations. If this is an...
Read more >
"Show" or "Hide" buttons or fields based on Get ...
If is use a variable based on Get (RecordOpenState) to hide or show the button it works fine. Expand Post.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found