Skip to content

Commit

Permalink
fix(playground): Allow Enter key within codemirror editor
Browse files Browse the repository at this point in the history
  • Loading branch information
cephalization committed Oct 11, 2024
1 parent e95da1f commit e505bd5
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions app/src/pages/playground/PlaygroundChatTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,27 +241,12 @@ function SortableMessageItem({
</Flex>
}
>
<div
css={css`
// TODO: remove these styles once the codemiror editor is added
.ac-textfield {
border: none !important;
border-radius: 0;
textarea {
padding: var(--ac-global-dimension-size-200);
}
}
`}
onKeyDownCapture={(e) => {
// Don't bubble up any keyboard events from the text area as to not interfere with DND
e.stopPropagation();
}}
>
<div>
<TemplateEditor
height="100%"
value={message.content}
aria-label="Message content"
templateLanguage={TemplateLanguages.Mustache}
templateLanguage={TemplateLanguages.FString}
onChange={(val) => {
updateInstance({
instanceId: playgroundInstanceId,
Expand Down

0 comments on commit e505bd5

Please sign in to comment.