Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"tailwindcss": "^3.3.3",
"tern": "^0.21.0",
"tinycolor2": "^1.4.2",
"tinymce": "7.7.1",
"tinymce": "6.8.3",
"toposort": "^2.0.2",
"tslib": "^2.3.1",
"typescript": "^5.5.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,13 @@ function RichtextEditorComponent(props: RichtextEditorComponentProps) {
],
// Configure text patterns to use space key trigger for markdown-style formatting
text_patterns: [
{ start: "#", format: "h1", trigger: "space" },
{ start: "##", format: "h2", trigger: "space" },
{ start: "###", format: "h3", trigger: "space" },
{ start: "1.", cmd: "InsertOrderedList", trigger: "space" },
{ start: "*", cmd: "InsertUnorderedList", trigger: "space" },
{ start: "-", cmd: "InsertUnorderedList", trigger: "space" },
{ start: ">", cmd: "mceBlockQuote", trigger: "space" },
{ start: "#", format: "h1" },
{ start: "##", format: "h2" },
{ start: "###", format: "h3" },
{ start: "1.", cmd: "InsertOrderedList" },
{ start: "*", cmd: "InsertUnorderedList" },
{ start: "-", cmd: "InsertUnorderedList" },
{ start: ">", cmd: "mceBlockQuote" },
],
Comment on lines 462 to 470
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

The comment on line 462 might need to be updated to match the implementation

The comment states that text patterns are configured "to use space key trigger", but the implementation no longer specifies a trigger, meaning it will use TinyMCE's default behavior instead of explicitly requiring a space key press. This change is consistent with the TinyMCE downgrade from 7.7.1 to 6.8.3.

- // Configure text patterns to use space key trigger for markdown-style formatting
+ // Configure text patterns for markdown-style formatting

🏁 Script executed:

#!/bin/bash
# Check TinyMCE 6.x documentation for default text pattern behavior
rg -A 5 -B 5 "text_patterns" --glob "*.md" || echo "No documentation found for text_patterns in the repository"

Length of output: 169


Update comment to reflect default TinyMCE trigger behavior

The existing comment still mentions an explicit “space key trigger,” but since we rely on TinyMCE’s default trigger now, the comment should be adjusted.

• File: app/client/src/widgets/RichTextEditorWidget/component/index.tsx
• Line: 462

- // Configure text patterns to use space key trigger for markdown-style formatting
+ // Configure text patterns for markdown-style formatting
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
text_patterns: [
{ start: "#", format: "h1", trigger: "space" },
{ start: "##", format: "h2", trigger: "space" },
{ start: "###", format: "h3", trigger: "space" },
{ start: "1.", cmd: "InsertOrderedList", trigger: "space" },
{ start: "*", cmd: "InsertUnorderedList", trigger: "space" },
{ start: "-", cmd: "InsertUnorderedList", trigger: "space" },
{ start: ">", cmd: "mceBlockQuote", trigger: "space" },
{ start: "#", format: "h1" },
{ start: "##", format: "h2" },
{ start: "###", format: "h3" },
{ start: "1.", cmd: "InsertOrderedList" },
{ start: "*", cmd: "InsertUnorderedList" },
{ start: "-", cmd: "InsertUnorderedList" },
{ start: ">", cmd: "mceBlockQuote" },
],
// Configure text patterns for markdown-style formatting
text_patterns: [
{ start: "#", format: "h1" },
{ start: "##", format: "h2" },
{ start: "###", format: "h3" },
{ start: "1.", cmd: "InsertOrderedList" },
{ start: "*", cmd: "InsertUnorderedList" },
{ start: "-", cmd: "InsertUnorderedList" },
{ start: ">", cmd: "mceBlockQuote" },
],

contextmenu: "link useBrowserSpellcheck image table",
setup: function (editor) {
Expand Down
10 changes: 5 additions & 5 deletions app/client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13878,7 +13878,7 @@ __metadata:
tern: ^0.21.0
terser-webpack-plugin: ^5.2.5
tinycolor2: ^1.4.2
tinymce: 7.7.1
tinymce: 6.8.3
toposort: ^2.0.2
ts-jest: ^29.1.0
ts-jest-mock-import-meta: ^0.12.0
Expand Down Expand Up @@ -33361,10 +33361,10 @@ __metadata:
languageName: node
linkType: hard

"tinymce@npm:7.7.1":
version: 7.7.1
resolution: "tinymce@npm:7.7.1"
checksum: e5deb0ee798c4af3d5c1ed4887e4b9541ec0355704731623f1fbb9f9afad09938e6d397c003cc82424aca381f252d4b324a6cac33fcdb79771daea23c5d8f8f7
"tinymce@npm:6.8.3":
version: 6.8.3
resolution: "tinymce@npm:6.8.3"
checksum: 2ce922ceb60636778afb21a493e99d561e73f82c5fb331a4f666d973129ca27277bc1b6332d6932ab8fe0a379b1f201285f143a2d72646a813fda88a0dec5312
languageName: node
linkType: hard

Expand Down
Loading