Closed jgillard closed 4 weeks ago
Which browser? version + os.
I've tested latest versions of Chrome, Safari & Firefox on a Mac (13.6.3), and all 3 show the issue.
Same here. Version 122.0.6261.128 (Official Build) (64-bit). Arch Linux, Linux 6.8.2-arch2-1, Gnome 46, X11.
As a workaround, set the editor to not resizable at settings:
MARKDOWNX_EDITOR_RESIZABLE = False
You might want to change the default size. You can with:
question = MarkdownxFormField(
required=False,
label="Add question",
widget=widgets.MarkdownxWidget(
attrs={"rows": "5", "cols": "40"}
),
)
Just came across this myself (Django 4.2, FireFox and Safari). Definitely started in 4.0.4 probably with https://github.com/neutronX/django-markdownx/commit/45df5cbcb380ba85f3d63f0111d657c025ca160e.
@juanignaciosl's fix above (https://github.com/neutronX/django-markdownx/issues/263#issuecomment-2038148082) does work for me. I haven't had a chance to try a code change fix yet.
Can anyone do tests to confirm that this fixes the problem?
Can anyone do tests to confirm that this fixes the problem?
Hey @adi-! I had just updated my comment above https://github.com/neutronX/django-markdownx/issues/263#issuecomment-2120363434 to note that https://github.com/neutronX/django-markdownx/issues/263#issuecomment-2038148082 does fix the issue for me when I saw your question.
OK, I will do checking on my side too.
OK, I will do checking on my side too.
Thanks so much for your work on this package @adi-!
Oh, I understood you wrong. There is a newer version 4.0.7
(https://github.com/neutronX/django-markdownx/releases/tag/v4.0.7) which already has some fixes on that. Can you confirm that 4.0.7
is already working for you?
Oh, I understood you wrong. There is a newer version
4.0.7
(https://github.com/neutronX/django-markdownx/releases/tag/v4.0.7) which already has some fixes on that. Can you confirm that4.0.7
is already working for you?
No sorry, it is still happening for me in 4.0.7
.
os/browser?
I'm seeing this on macOS Ventura 13.6.6 with both Safari 17.3.1 and FireFox 127.0b3.
Yep as mentioned in my original post this issue still exists on 4.0.7. I've just retested with that version, and MacOS 14.4.1 and Safari of the same version / Chrome 124 / Firefox 124.0.2, and the issue persists for all of those.
That is really strange. I have tested this on Ubuntu/Firefox, osx/Safari, osx/Firefox and everything looks fine.
Can you verify that web browser's cache was cleared?
Can you verify that web browser's cache was cleared?
Yup! I tried clearing the cache and even a private browsing window in both Safari and Firefox.
I just installed this plugin for the first time and immediately noticed this issue. Running Python 3.12 container on rpi, Django 5.0.6, and django-markdownx 4.0.7 Issue shows up in Chrome on both Chrome OS and Windows 11. I didn't test any other browsers.
+1 Firefox 129.0 Fedora 40 python3.11 django-markdownx 4.0.7
So I managed to fix this by making my admin site class inherit from markdownx.admin.MarkdownxModelAdmin
class PostAdmin(MarkdownxModelAdmin):
view_on_site = True
Finally figured out what is going on here. When you want to register model field into admin, you need to use MarkdownxModelAdmin
base class. I think you forgot about adding it in your admin.py
. Read about it here: https://neutronx.github.io/django-markdownx/example/#django-admin
P.S. Set height for the editor works as it should.
When typing or even focussing in the editor, the height of the textarea grows:
I think this behaviour first started in v4.0.4. We first noticed it when upgrading from v4.0.2 to v4.0.7. The latest version v4.0.7 still exhibits this behaviour.