[PR #3875] [MERGED] Markdown Editor Updates #6274

Closed
opened 2026-02-05 10:28:15 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3875
Author: @ssddanbrown
Created: 11/26/2022
Status: Merged
Merged: 11/28/2022
Merged by: @ssddanbrown

Base: developmentHead: md_editor_updates


📝 Commits (7)

  • 63d6272 Refactored markdown editor logic
  • 8e4bb32 Fixed md editor refactoring issues after manual test
  • 3fdb88c Added callout cycling in markdown editor via shortcut
  • 3995b01 Tightened existing markdown editor styles
  • 9fd5190 Added md editor ui dropdown options & their back-end storage
  • ec3713b Connected md editor settings to logic for functionality
  • 0527c4a Added test to preference boolean endpoint

📊 Changes

21 files changed (+1038 additions, -626 deletions)

View changed files

📝 app/Config/setting-defaults.php (+2 -0)
📝 app/Http/Controllers/UserPreferencesController.php (+25 -0)
📝 resources/icons/image.svg (+1 -4)
📝 resources/js/components/markdown-editor.js (+66 -568)
resources/js/markdown/actions.js (+448 -0)
resources/js/markdown/codemirror.js (+70 -0)
resources/js/markdown/common-events.js (+33 -0)
resources/js/markdown/display.js (+109 -0)
resources/js/markdown/editor.js (+54 -0)
resources/js/markdown/markdown.js (+30 -0)
resources/js/markdown/settings.js (+40 -0)
resources/js/markdown/shortcuts.js (+48 -0)
📝 resources/js/services/components.js (+2 -15)
resources/js/services/text.js (+19 -0)
📝 resources/lang/en/entities.php (+2 -0)
📝 resources/sass/_forms.scss (+40 -25)
📝 resources/sass/_layout.scss (+3 -0)
📝 resources/sass/_text.scss (+1 -1)
📝 resources/views/pages/parts/markdown-editor.blade.php (+26 -13)
📝 routes/web.php (+1 -0)

...and 1 more files

📄 Description

  • Refactored markdown editor codebase to modular components.
  • Added cycling of callout types via shortcut.
  • Added settings for preview control and scroll sync.

Applied further latter changes in 31c28be57a.
This changes the setting storage to be localStorage since these controls may be desired to be device specific since they're very screen size dependant. Also added resize control via centre border drag.

Todo

  • Check each bit of editor functionality.
  • Ctrl+9 callout cycle?
  • Hide preview?
  • Toggle sync?
  • Test added endpoints

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3875 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 11/26/2022 **Status:** ✅ Merged **Merged:** 11/28/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `md_editor_updates` --- ### 📝 Commits (7) - [`63d6272`](https://github.com/BookStackApp/BookStack/commit/63d62722825b9ba77f75db531363d29f9dcc6c68) Refactored markdown editor logic - [`8e4bb32`](https://github.com/BookStackApp/BookStack/commit/8e4bb32b779747c3d62673e21588632cd265677f) Fixed md editor refactoring issues after manual test - [`3fdb88c`](https://github.com/BookStackApp/BookStack/commit/3fdb88c7aa6f6ecfe15074802f288a0919b79f43) Added callout cycling in markdown editor via shortcut - [`3995b01`](https://github.com/BookStackApp/BookStack/commit/3995b01399e5602a0c401eb33f51e9b3cdf3c120) Tightened existing markdown editor styles - [`9fd5190`](https://github.com/BookStackApp/BookStack/commit/9fd5190c702c4ef755efdf91edd24420e5a8bb75) Added md editor ui dropdown options & their back-end storage - [`ec3713b`](https://github.com/BookStackApp/BookStack/commit/ec3713bc743d56d2aeea5fe6890f8843dce63127) Connected md editor settings to logic for functionality - [`0527c4a`](https://github.com/BookStackApp/BookStack/commit/0527c4a1ea75f05799c233f17ac2345c9276f699) Added test to preference boolean endpoint ### 📊 Changes **21 files changed** (+1038 additions, -626 deletions) <details> <summary>View changed files</summary> 📝 `app/Config/setting-defaults.php` (+2 -0) 📝 `app/Http/Controllers/UserPreferencesController.php` (+25 -0) 📝 `resources/icons/image.svg` (+1 -4) 📝 `resources/js/components/markdown-editor.js` (+66 -568) ➕ `resources/js/markdown/actions.js` (+448 -0) ➕ `resources/js/markdown/codemirror.js` (+70 -0) ➕ `resources/js/markdown/common-events.js` (+33 -0) ➕ `resources/js/markdown/display.js` (+109 -0) ➕ `resources/js/markdown/editor.js` (+54 -0) ➕ `resources/js/markdown/markdown.js` (+30 -0) ➕ `resources/js/markdown/settings.js` (+40 -0) ➕ `resources/js/markdown/shortcuts.js` (+48 -0) 📝 `resources/js/services/components.js` (+2 -15) ➕ `resources/js/services/text.js` (+19 -0) 📝 `resources/lang/en/entities.php` (+2 -0) 📝 `resources/sass/_forms.scss` (+40 -25) 📝 `resources/sass/_layout.scss` (+3 -0) 📝 `resources/sass/_text.scss` (+1 -1) 📝 `resources/views/pages/parts/markdown-editor.blade.php` (+26 -13) 📝 `routes/web.php` (+1 -0) _...and 1 more files_ </details> ### 📄 Description - Refactored markdown editor codebase to modular components. - Added cycling of callout types via shortcut. - Added settings for preview control and scroll sync. Applied further latter changes in 31c28be57a53bc543e34bdf113ecd64e8ee11ed1. This changes the setting storage to be localStorage since these controls may be desired to be device specific since they're very screen size dependant. Also added resize control via centre border drag. ### Todo - [x] Check each bit of editor functionality. - [x] Ctrl+9 callout cycle? - [x] Hide preview? - [x] Toggle sync? - [x] Test added endpoints --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:28:15 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6274