investigate to use martor for markdown editing with a GUI and not the barebone editing.
https://github.com/agusmakmun/django-markdown-editor
Main work is to make a tailwind-based css for styling the widget.
we can use it like this:
class ModifiedPagedownWidget(MartorWidget):
class Media:
extend = False
css = {
'all': ('plugins/css/ace.min.css',
'plugins/css/resizable.min.css',
'martor/css/martor.bootstrap.min.css')
}
js = ('plugins/js/ace.js',
'plugins/js/mode-markdown.js',
'plugins/js/ext-language_tools.js',
'plugins/js/theme-github.js',
'plugins/js/typo.js',
'plugins/js/spellcheck.js',
'plugins/js/highlight.min.js',
'plugins/js/resizable.min.js',
'plugins/js/emojis.min.js',
'martor/js/martor.bootstrap.min.js')
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
besides the CSS, also the javascript needs to be adapted due to dropdowns, switching between edit and preview, and the doc modal.
to use our extensions, just do
MARTOR_MARKDOWN_EXTENSIONS = [
'apps.gcd.markdown_extension:TailwindExtension',
'apps.gcd.markdown_extension:GCDFieldExtension',
'apps.gcd.markdown_extension:GCDFieldLinkNameExtension',
'apps.gcd.markdown_extension:URLExtension',
]
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I took a closer look at the current options, and I think the best path is to extend the MarkdownX editor we already have rather than replace it with Martor. Martor has improved and now supports Tailwind, but it would bring in quite a bit more JavaScript, CSS, and editor-specific behavior than we really need. Keeping MarkdownX also means we can preserve the current preview and GCD-specific Markdown extensions while adding a lightweight formatting toolbar.
My suggestion would be to create a shared GCD Markdown widget, add the standard formatting buttons plus a helper for GCD links, and make sure the editor preview uses the same rendering configuration as saved content. That should give editors a much friendlier experience without replacing the underlying editor or requiring any data migration.
A few questions for clarification:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I don't see how fullscreen editing would be useful for us, we only edit small parts.
Syntax highlighting, no idea. Formatting toolbar mainly.
We have the helper text for GCD links on the editing page. But if it can be made easier, would be helpful.
No image uploads.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I don't see how fullscreen editing would be useful for us, we only edit small parts.
Syntax highlighting, no idea. Formatting toolbar mainly.
We have the helper text for GCD links on the editing page. But if it can be made easier, would be helpful.
No image uploads.
Can you assign this one to me as well please.
Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()