Features Suggestion to codemirror #27656
rc-advertoo
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Prerequisites
Hello,
i really love the Elementor custom code snippets, i always use them to organize code between pages.
Problem comes when there is a lot to code to write, lot of lines (obviously) and there is difficult to move inside, remember in what css media currently you are etc.
Solution
That codemirror editor can easely improved with some useful features i have already implemented without edit the plugin code, i have just used a couple of wp action hooks (script_loader_tag and admin_footer ).
These are the improvements:
1. code folding
self-explanatory
2. sticky lines
this is an interesting featured, based on Phpstorm Sticky Lines: The sticky lines feature pins key structural elements, such as function or class declarations, to the top of the editor as you scroll, keeping scopes visible for quick navigation in large files and codebases.
You can also click any of the sticky lines to scroll the editor to the corresponding declaration.
This is an explanatory gif from Phpstorm documentation: https://resources.jetbrains.com/help/img/idea/2024.1/ws_sticky_lines_dark.animated.gif
With these features, I have drastically improved efficiency in writing code.
As I mentioned before, I have already implemented this solution. Is there a way I can send you the PHP file containing all the implementation code (PHP, CSS, and JS)?
Another cool features could be:
Thanks
Agreement
All reactions