Skip to content

Replace editor with Codemirror #786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andersmmg
Copy link

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/dockge/blob/master/CONTRIBUTING.md

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Replaces the prism editor with codemirror. Fixes several annoyances I've had. Uses Python highlighting for .env because it works well and doesn't really matter much. Mostly did this for myself but hopefully it can benefit others as well.
Fixes #105, #530 and related editor issues.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • User interface (UI)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots

image
image

@andersmmg
Copy link
Author

If anyone wants to be able to use this now, I have a fork with a docker image at andersmmg/dockge. Just replace louislam with andersmmg in your existing docker compose file. Hopefully this gets merged eventually but for now this works

@cmcooper1980
Copy link

If anyone wants to be able to use this now, I have a fork with a docker image at andersmmg/dockge. Just replace louislam with andersmmg in your existing docker compose file. Hopefully this gets merged eventually but for now this works

Hi, this is awesome work...I have a fork as well but just merge several PRs I find useful. I tried to merge yours but unfortunately I am not very familiar with VUE.js to get your PR to work nicely with the global environment PR I merged.
If it is not too big an ask, I was wondering if you could have a look and make suggestions?

Dracrius added a commit to Dracrius/dockge that referenced this pull request Jun 2, 2025
…e-editor

Merged @andersmmg's pull request replacing the editor with codemirror.
Dracrius added a commit to Dracrius/dockge that referenced this pull request Jun 2, 2025
Merge @andersmmg's pull request replacing the editor with codemirror.
Dracrius added a commit to Dracrius/dockge that referenced this pull request Jun 5, 2025
Merged @andersmmg's pull request that replaces the prism editor with codemirror.
@Dracrius
Copy link

Dracrius commented Jun 6, 2025

@andersmmg any idea how to setup / use the default themes? I'm really not a fan of the bright green dracula uses but I can't get anything other then the theme from thememirror to work. Codemirror has a whole theme tester https://codemirror.net/5/demo/theme.html and they are all listed here https://codemirror.net/5/theme/ . I was hoping to use the moxer one.

@andersmmg
Copy link
Author

andersmmg commented Jun 6, 2025

@Dracrius I was able to use most of the themes available for the latest codemirror, I can see if I can get that theme working later when I have time. I would think it should be as simple as importing it and setting the theme

Edit: looks like moxer isn't listed in the themes for codemirror 6, it might just not have been ported to the latest version but I'll see when I can

@Dracrius
Copy link

Dracrius commented Jun 6, 2025

@Dracrius I was able to use most of the themes available for the latest codemirror, I can see if I can get that theme working later when I have time. I would think it should be as simple as importing it and setting the theme

Edit: looks like moxer isn't listed in the themes for codemirror 6, it might just not have been ported to the latest version but I'll see when I can

Ah silly me I should have realized the 5 in the url meant they were for codemirror 5. I appreciate the help. That theme, a github dark or vscode dark theme would all work if moxer was never ported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker compose line numbers stop for large files
3 participants