4

I am using editor.md,
the editor display line numbers as default,

enter image description here

I want to hide the line number and find it setting lineNumber as false,

$(function(){
      editormd.markdownToHTML("editormd-view", {
      htmlDecode      : "style,script,iframe",  // you can filter tags decode
      lineNumbers     : false,
    });
});

However, it did not take effect,

I traverse through the source code editormd.js all day long to comment out keywords "linenums" , "linen" etc, but still not solve the problem.

The source file is markdown without line numbers.

Does anyone encounter such a problem with this editor?

Thariama
  • 50,002
  • 13
  • 138
  • 166
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138

1 Answers1

3

You could do something like this:

.CodeMirror-gutter-wrapper {display: none;}

Or set that style for each element with that class in javascript.

for (var i = 0; i < document.getElementsByClassName("CodeMirror-gutter-wrapper").length; i++) {
    document.getElementsByClassName("CodeMirror-gutter-wrapper")[i].style.display = "none";
}
Sachin S
  • 58
  • 4