Open jdev082 opened 2 years ago
oh? the one with content editing enabled. Then how would anyone type text then?
OK, let me see. I think this would require some JS. also where is script.js
?
OK, let me see. I think this would require some JS. also where is
script.js
?
i didnt push my changes yet.
OK!
I can't push my changes, i hate it when i forget to commit my changes before merging PRs, Now I can't merge it! I didn't add anything anyway.
What happened? What's the error?
@webdev03 i said i didnt even change much
But why can't you push your changes?
just fix the bug i cant fix :(
[nvm]
You could use a textarea
if this works.
@webdev03 im not using jquery
I can use this cool copy paste code if i was boring
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
lineNumbers: true,
mode: 'text/x-perl',
theme: 'abbott',
});
<script language="javascript" type="text/javascript" src="https://codemirror.net/lib/codemirror.js"></script>
<script language="javascript" type="text/javascript" src="https://codemirror.net/mode/perl/perl.js"></script>
<link rel="stylesheet" type="text/css" href="https://codemirror.net/lib/codemirror.css"></link>
<link rel="stylesheet" type="text/css" href="https://codemirror.net/theme/abbott.css"></link>
<textarea id="code" name="code">
if($cool_variable) {
doTheCoolThing(); # it's PRETTY cool, imho
}</textarea>
Ok, so https://codemirror.net/ may help. Or https://stackoverflow.com/a/61053609/17333186
I'd suggest modifying https://stackoverflow.com/a/61053609/17333186 and it would work. But then we could also have another solution which I can tell you.
code mirror doesn't have line numbers
It does. But then it would ruin the whole point of making it ourself if we use it.
@webdev03 No it doesn't, very clearly when I copied and pasted the code it didn't have anything but an editable text area.
no codemirror, that's cheaty
@kccuber-scratch with plain HTML/CSS/JS (which i want to do it in) that's the only option.
https://www.thatsoftwaredude.com/content/8912/create-a-basic-text-editor-in-javascript the tutorial i originally followed
the site is unusable because of the unblockable popups you cant get rid of.
the site is unusable because of the unblockable popups you cant get rid of.
it literally has 2 popups, the other can be blocked by an adblocker
the site is unusable because of the unblockable popups you cant get rid of.
it literally has 2 popups, the other can be blocked by an adblocker
both are in the WAY of the stuff on the web page.
also the guide doesn't have line numbers, which i need
the site is unusable because of the unblockable popups you cant get rid of.
it literally has 2 popups, the other can be blocked by an adblocker
both are in the WAY of the stuff on the web page.
no, i was able to close them. on the first one theres a big text that says "X close" and on the second one there's a small "no thanks" at the bottom right corner
there's no X on the email asking one.
there's no X on the email asking one.
it's right below the box that asks for your email, screenshot pls
here's what i found (and pasted) so far. i have found copied and pasted all the source. so this is what i have.
still no line numbers tho.
i cant type in it anymore?
fixed.
none of the formatting buttons work tho
nvm they do.
not on gh-pages tho, github messed up my changes. and so did vscode.
fixed.
???
@JaydenDev did you switch to VSCode? I thought you used vim.
@webdev03 I use vscode any time I'm dealing with multiple files, it also has better syntax highlighting. Also a built in terminal and ... [...]
Oh, ok. I use it too, you don't need to explain why it's better.
Also it's nice to use jefallo's live server hosting extension for VSCODE. so that I can easily have it automatically reload every file save and have an easy server hosted on localhost for me to test.
Same! Jeffalo's extension is awesome for working on static projects 🤣
gh copilot doesn't work since im still in the waiting list.
I just joined the waiting list. I hope I get in! :smile:
it looks like the div that holds the line number can be backspaced out of existence?