[GrandComicsDatabase/gcd-django] alternative markdown editor (Issue #661)

7 views
Skip to first unread message

JochenGCD

unread,
May 11, 2025, 2:46:02 AM5/11/25
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd created an issue (GrandComicsDatabase/gcd-django#661)

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.Message ID: <GrandComicsDatabase/gcd-django/issues/661@github.com>

JochenGCD

unread,
May 11, 2025, 4:30:44 AM5/11/25
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd left a comment (GrandComicsDatabase/gcd-django#661)

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.Message ID: <GrandComicsDatabase/gcd-django/issues/661/2869629138@github.com>

Reply all
Reply to author
Forward
0 new messages