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.![]()