simple-code-editor icon indicating copy to clipboard operation
simple-code-editor copied to clipboard

Feature Implementation: Line Numbers

Open WilliamFalci opened this issue 3 years ago • 2 comments

With those simple changes you add a new prop named "count_lines" default false, if parsed true this enable the css class "count-lines" into code mark, showing in this way the line's number at the left

Schermata 2022-09-28 alle 17 17 45

WilliamFalci avatar Sep 28 '22 15:09 WilliamFalci

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
simple-code-editor ✅ Ready (Inspect) Visit Preview Oct 18, 2022 at 9:46AM (UTC)

vercel[bot] avatar Sep 28 '22 15:09 vercel[bot]

@ErwinAI I applied some of the stuff we discussed up, anyway if you (or someone else) need use it "immediatly" you can use this code, directly into style scoped of the vue page where you use simple-code-editor, or just adding it in global way:

.code_editor:deep(pre>code>span){+
   counter-increment: line;
}
.code_editor:deep(pre>code){
   counter-reset: line;
}

.code_editor:deep(code>span:before){
   content: counter(line);
   position: absolute;
   left: 1px;
   font-size: 7px;
   color: #777777;
   padding-top: 4px;
}

WilliamFalci avatar Oct 18 '22 09:10 WilliamFalci

^Bump

It has been a few weeks, I would like to use this feature

BrandonDR avatar Nov 16 '22 21:11 BrandonDR

Is this going to be merged?

msherburne avatar Dec 06 '22 06:12 msherburne

1

The new feature "line numbers" has been added

justcaliturner avatar May 23 '23 14:05 justcaliturner