Skip to content

Conversation

@JOTSR
Copy link
Contributor

@JOTSR JOTSR commented May 31, 2024

Summary

Add multiline prompt type (TextBox).

Motivation

Allow direct multiline prompt in terminal (without editing features).

Changes

  • Add prompt/textbox.ts.

Todo

  • Support erase and text navigation.
  • Fix stdin issue (fast closed after first prompt')
  • Implement fully (all methods).
  • Add tests.
  • Add doc.

Maybe choose a better name: "textbox", "textblock", "textarea", ...

@JOTSR
Copy link
Contributor Author

JOTSR commented May 31, 2024

@c4spar Before continuing to work on this feature (tests, improve code, and docs), does this feat right for you ?

@JOTSR JOTSR marked this pull request as draft May 31, 2024 12:24
@JOTSR
Copy link
Contributor Author

JOTSR commented Jun 1, 2024

Demo

Default options

image

Custom endDelimiter

image

@c4spar
Copy link
Owner

c4spar commented Jun 2, 2024

Sounds good to me 👍 TextBox and TextArea are fine for me. Another name could be MultilineInput.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants