-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Describe the project you are working on:
Designing solutions (either for editor changes or an addon) that involve browsing and displaying data regarding third-party addons.
Describe the problem or limitation you are having in your project:
Markdown README files are an industry-standard resource for sharing project information. Creators need to be able to edit and preview (render) them, and users need to be able to view (render) them. The Asset Library could then be refactored to render Markdown files (related to #12).
Describe how this feature / enhancement will help you overcome this problem or limitation:
- Allows users to employ more familiar and featureful technology than what Godot currently offers.
- Allows Godot to take advantage of a wealth of information already accessible on the Internet.
- Prevents users from needing to duplicate and maintain information between the Asset Library asset information (description) and the project's own README (the standard).
- Allows users to create, edit, and preview their own project's README directly from Godot rather than having to use a separate tool.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
This would be similar to how VS Code's Extensions tab looks. Below is an example for #12 on how things could appear in the Asset Library if refactored to display Markdown files.
In fact, @fenix-hub's TextEditor plugin already has a dedicated viewport with an editor and previewer for Markdown files, so it would be an excellent starting place for creating an extension to the built-in ScriptEditor that does the same.
Raw .md file:
WIP conversion to rendered content (will eventually have headers, online images, etc.):
Describe implementation detail for your proposal (in code), if possible:
- Add an
/editor/markdown_editor.h
class for editing Markdown files and integrate it into the ScriptEditor. - Add an
/editor/markdown_renderer.h
class for rendering a Markdown file's contents. - Update the ScriptEditor in these scenarios to have a Tab, CheckButton, or similar for editing versus previewing the currently opened .md file. (hide when not editing a .md file).
- Update the EditorFileSystem dock to display .md files and allow them to be selected/edited.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Most of the community using any sort of addon (either creating OR using) would use this, so almost everyone.
Yes, this could be done as a plugin in script code. No, it would not be just a few lines. It would be a huge amount of work just to create a well-written editor and renderer pair.
Is there a reason why this should be core and not an add-on in the asset library?:
Yes. The ScriptEditor integration portion is something that can only properly be done with direct editor modifications in the source code.
Furthermore, we are talking about an industry-standard text format. It should be built into the editing experience for all users, without the need for a plugin.