diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-05 20:17:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 13:17:25 +0100 |
commit | a38ba634a4da15fbb2d1b6ac6742cf01c1503ea4 (patch) | |
tree | 9bf892ae0e481e2d3b36b1eaf9a5273152c3c628 /routers/web/repo/editor.go | |
parent | 0572c78938d3d8287f81f53effc7ffaacd75d3e7 (diff) | |
download | gitea-a38ba634a4da15fbb2d1b6ac6742cf01c1503ea4.tar.gz gitea-a38ba634a4da15fbb2d1b6ac6742cf01c1503ea4.zip |
Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE (#18069)
This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
Diffstat (limited to 'routers/web/repo/editor.go')
-rw-r--r-- | routers/web/repo/editor.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index 12098ddc69..1a7edb7bb4 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -69,7 +69,6 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.Data["PageIsEdit"] = true ctx.Data["IsNewFile"] = isNewFile ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireEasyMDE"] = true canCommit := renderCommitRights(ctx) treePath := cleanUploadFileName(ctx.Repo.TreePath) @@ -200,7 +199,6 @@ func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile b ctx.Data["PageHasPosted"] = true ctx.Data["IsNewFile"] = isNewFile ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireEasyMDE"] = true ctx.Data["TreePath"] = form.TreePath ctx.Data["TreeNames"] = treeNames ctx.Data["TreePaths"] = treePaths @@ -544,7 +542,6 @@ func DeleteFilePost(ctx *context.Context) { func UploadFile(ctx *context.Context) { ctx.Data["PageIsUpload"] = true ctx.Data["RequireTribute"] = true - ctx.Data["RequireEasyMDE"] = true upload.AddUploadContext(ctx, "repo") canCommit := renderCommitRights(ctx) treePath := cleanUploadFileName(ctx.Repo.TreePath) @@ -580,7 +577,6 @@ func UploadFilePost(ctx *context.Context) { form := web.GetForm(ctx).(*forms.UploadRepoFileForm) ctx.Data["PageIsUpload"] = true ctx.Data["RequireTribute"] = true - ctx.Data["RequireEasyMDE"] = true upload.AddUploadContext(ctx, "repo") canCommit := renderCommitRights(ctx) |