FLUTTER ECOSYSTEM

playmoweb/markdown-editable-textinput

MarkdownEditableTextInput은 TextField 내의 내용을 쉽게 마크다운으로 변환할 수 있는 TextField 위젯입니다。

마크다운-편집 가능한 텍스트 입력 프로젝트 이미지
Stars
75
Forks
54
최근 푸시(UTC)
2024. 5. 25.
프로젝트 상태
활성
Playmoweb GitHub avatar
GITHUB Organization

Playmoweb ↗

mobile app design & development company

언어DartHTMLKotlinSwiftShellObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개
  • flutter{"sdk":"flutter"}
  • effective_dart^1.3.2
  • expandable^5.0.1
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Build Status pub package codecov

markdown_editable_textinput

MarkdownEditableTextInput is a TextField Widget that allow you to convert easily what's in the TextField to Markdown.

Features

  • [x] Convert to Bold, Italic, Strikethrough
  • [x] Convert to Code, Quote, Links
  • [x] Convert to Heading (H1, H2, H3, H4, H5, H6) and Links
  • [x] Support text direction
  • [x] Dialog mode to enter link and picture
  • [x] Possibility to add custom buttons to the action bar

Demo

https://raw.githubusercontent.com/playmoweb/markdown-editable-textinput/HEAD/pictures/test_edition.gif

Link by Dialog demo

https://raw.githubusercontent.com/playmoweb/markdown-editable-textinput/HEAD/pictures/link_demo.gif

Usage

The color of the MarkdownTextInput is defined by the color set in your Theme :

  • primaryColor: Cursor's color
  • colorScheme.secondary: MarkdownTextInput's borders
  • cardColor: Background color of MarkdownTextInput
Attributes
Attributes Example Value Description
Function onTextChanged Callback used to retrieve the text in parent's Widget
String initialValue "Lorem Ipsum" Display an initial value in MarkdownTextInput's field
Function validators Add validators to the MarkdownTextInput
String label "Description" Display a label in MarkdownTextInput
TextDirection textDirection TextDirection.rtl Change text direction
int maxLines 3 The maximum of lines that can be display in the input
List actions [MarkdownType.bold, MarkdownType.italic] Actions the editor will handle
TextEditingController controller TextEditingController() Pass your own controller. Can be used to clear the input for example
TextStyle textStyle Theme.of(context).textTheme.bodyText2 Overrides input text style
bool insertLinksByDialog; true Choose to use dialog or not to insert link
bool insertImageByDialog; true Choose to use dialog or not to insert an image
bool insertImageByDialog; true Choose to use dialog or not to insert an image
bool customCancelDialogText; String? Text used by dialog for close dialog action
bool customSubmitDialogText; String? Text used by dialog for validate dialog action
Example

You can see an example of how to use this package here