]> source.dussan.org Git - gitea.git/commit
Show client-side error if wiki page is empty (#17415)
authorDavid Jimenez <dvejmz@users.noreply.github.com>
Wed, 27 Oct 2021 04:33:22 +0000 (05:33 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Oct 2021 04:33:22 +0000 (12:33 +0800)
commita462fcaac8825e992c99e3298a28c649682c0c92
tree3d32e1762dbca27486c602f144164eb094aeda90
parent8f9ac439cae544a7bad3acfba2fdd08f84c75ba8
Show client-side error if wiki page is empty (#17415)

* fix: show client-side error if wiki page is empty

Implement a JS, client-side validation workaround for a bug in the upstream
editor library SimpleMDE which breaks HTML5 client-side validation when
a wiki page is submitted.

This allows native, client-side errors to appear if
the text editor contents are empty.

See upstream bugfix report: https://github.com/sparksuite/simplemde-markdown-editor/issues/324

Signed-off-by: David Jimenez <dvejmz@sgfault.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
templates/repo/wiki/new.tmpl
web_src/js/features/repo-wiki.js