Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chg(channels): allow headings in message editor (#4021)

Seamusec236b55c07e
diff --git a/js/app/packages/core/component/LexicalMarkdown/builder/MarkdownConfigBuilder.ts b/js/app/packages/core/component/LexicalMarkdown/builder/MarkdownConfigBuilder.ts
index ba6ab59c16..a8e8d2eb27 100644
--- a/js/app/packages/core/component/LexicalMarkdown/builder/MarkdownConfigBuilder.ts
+++ b/js/app/packages/core/component/LexicalMarkdown/builder/MarkdownConfigBuilder.ts
@@ -243,7 +243,7 @@ export class EditorConfigBuilder implements EditorBuilder {
* `selection` after the component has mounted.
*
* @param type - Lexical editor mode. Defaults to `'markdown'` (full rich-text).
- * Use `'chat'` for a mode that supports mention nodes but omits heading
+ * Use `'chat'` for a mode that supports mention nodes without media nodes.
* shortcuts, or `'plain-text'` for a plain-text-only editor.
*
* @example
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx b/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx
index cb3b84bfc9..31d5438b71 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx
@@ -70,7 +70,7 @@ import { NodeAccessoryRenderer } from './NodeAccessoryRenderer';
* The current markdown text is passed as an argument.
* @param initialValue - The initial markdown text to display in the textarea.
* @param placeholder - The placeholder text to display in the textarea.
- * @param type - The type of editor to use. Defaults to 'markdown'. Could aslo pass chat to turn off headings.
+ * @param type - The type of editor to use. Defaults to 'markdown'.
* @param onEnter - A callback function that is called when the user presses Enter in the textarea.
* If the function returns true, the enter press will not propagate to the lexical editor.
* @param onEscape - A callback function that is called when the user presses Escape in the textarea. If the function
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/debug/EditorTestPage.tsx b/js/app/packages/core/component/LexicalMarkdown/component/debug/EditorTestPage.tsx
index 7cae36fb6c..eeb9609807 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/debug/EditorTestPage.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/debug/EditorTestPage.tsx
@@ -150,7 +150,7 @@ export default function EditorTestPage() {
/>
</Container>
- <Container label="chat editor (no headings) + custom placeholder">
+ <Container label="chat editor + custom placeholder">
<MarkdownTextarea
type="chat"
editable={() => true}
diff --git a/js/lexical-core/node-list.ts b/js/lexical-core/node-list.ts
index 522d961618..0c4d3fed69 100644
--- a/js/lexical-core/node-list.ts
+++ b/js/lexical-core/node-list.ts
@@ -122,6 +122,6 @@ export const RegisteredNodesByType: { [K in EditorType]: ValidNode[] } = {
'plain-text': [ParagraphNode, TextNode],
markdown: [...SupportedNodeTypes],
'markdown-sync': [...SupportedNodeTypes],
- chat: exclude([HeadingNode, ImageNode, VideoNode]),
+ chat: exclude([ImageNode, VideoNode]),
title: [ParagraphNode, TextNode, InlineSearchNode],
} as const;