-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix EasyMDE error when input Enter #19004
Conversation
const tributeContainer = document.querySelector('.tribute-container'); | ||
if (!tributeContainer || tributeContainer.style.display === 'none') { | ||
return window.CodeMirror.Pass; | ||
cm.execCommand('newlineAndIndent'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not cm.Pass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeMirror.Pass
exists, while cm = CodeMirror(...); cm.Pass
doesn't exist.
I have read through the EasyMDE and CodeMirror code, it's impossible to access CodeMirror.Xxx
in Gitea now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine I guess if the end result is the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the same. CodeMirror document said: the default command for Enter
is newlineAndIndent
.
* giteaofficial/main: Fix EasyMDE error when input Enter (go-gitea#19004) Fix update hint bug (go-gitea#18996) Fix the editor height in review box (go-gitea#19003) Add a "admin user generate-access-token" subcommand (go-gitea#17722) Fix potential assignee query for repo (go-gitea#18994) Add config option to disable "Update branch by rebase" (go-gitea#18745) Update `go-enry` to v2.8.0 (go-gitea#18993) homebrew updates via cron ignore missing comment for user notifications (go-gitea#18954) allow overwrite artifacts for github releases (go-gitea#18987) fix & refactor (go-gitea#18973)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
The PR #18911 removes global
window.CodeMirror
, now when input Enter in EasyMDE, there is an error (window.CodeMirror.Pass
):This PR fixes the error.