Skip to content

Sorry, Show/Hide Linenumbers in Gutter #5349

Answered by ldijkman
ldijkman asked this question in Q&A
Discussion options

You must be logged in to vote

wow i spend many hours on this one searching and trying

 <input type="button" class="dropbt" id="linenmbrsbutton" onclick="togglelinenumbers()" title="Toggle the Gutter LineNumbers" style="" onmouseover="this.focus()" value="Hide LineNumbers">
<script>  
 var onoff=1;
function togglelinenumbers() {
  if (onoff==1) {
      editor.setOption('showLineNumbers', false);
      doocument.getElementById("linenmbrsbutton").value="Show LineNumbers";
      onoff=0;
  }else{
       editor.setOption('showLineNumbers', true);
       doocument.getElementById("linenmbrsbutton").value="Hide LineNumbers";
      onoff=1;
  }
</script>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ldijkman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant