diff options
author | Gusted <postmaster@gusted.xyz> | 2024-10-22 19:58:44 +0200 |
---|---|---|
committer | Gusted <postmaster@gusted.xyz> | 2024-10-22 19:58:44 +0200 |
commit | 4c6587d6a084d45cdbb5bd900f99573d0259d984 (patch) | |
tree | 95d38e4d8504ce42d4e4e8c8033929bfcb638acb /web_src/js | |
parent | Merge pull request 'conf: Improve delete_old_actions description' (#5644) fro... (diff) | |
download | forgejo-4c6587d6a084d45cdbb5bd900f99573d0259d984.tar.xz forgejo-4c6587d6a084d45cdbb5bd900f99573d0259d984.zip |
feat: use combo markdown editor for milestone description
- Use the combo markdown editor for the milestone description. The
milestone description is rendered in markdown, so it makes sense to use
a 'markdown-aware' editor. This also includes the option to use
monospace font.
- Resolves #5649
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/features/repo-milestone.js | 9 | ||||
-rw-r--r-- | web_src/js/index.js | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/web_src/js/features/repo-milestone.js b/web_src/js/features/repo-milestone.js new file mode 100644 index 0000000000..6a1cff5cc6 --- /dev/null +++ b/web_src/js/features/repo-milestone.js @@ -0,0 +1,9 @@ +import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js'; + +export function initRepoMilestoneEditor() { + const editor = document.querySelector('.page-content.repository.milestone .combo-markdown-editor'); + if (!editor) { + return; + } + initComboMarkdownEditor(editor); +} diff --git a/web_src/js/index.js b/web_src/js/index.js index 77014a74c0..80aff9e59e 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -86,6 +86,7 @@ import {initRepoDiffCommitBranchesAndTags} from './features/repo-diff-commit.js' import {initDirAuto} from './modules/dirauto.js'; import {initRepositorySearch} from './features/repo-search.js'; import {initColorPickers} from './features/colorpicker.js'; +import {initRepoMilestoneEditor} from './features/repo-milestone.js'; // Init Gitea's Fomantic settings initGiteaFomantic(); @@ -175,6 +176,7 @@ onDomReady(() => { initRepoContributors(); initRepoCodeFrequency(); initRepoRecentCommits(); + initRepoMilestoneEditor(); initCommitStatuses(); initCaptcha(); |