패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.2.15

markdown_editor_plus

TextField 내용을 쉽게 마크다운으로 변환할 수 있는 TextField 위젯이며 사용자 정의 도구 모음 지원 기능이 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
8.3천
좋아요
73
Pub 점수
140

패키지 설치

flutter pub add markdown_editor_plus

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

실시간 마크다운 형식 지정 기능을 갖춘 플러터 위젯입니다. 텍스트 필드를 감싸 마크다운 문법 변환을 지원하며, 사용자 정의 가능한 도구 모음으로 쉽게 서식을 지정할 수 있습니다. 메모 앱이나 콘텐츠 관리 시스템과 같이 마크다운 출력이 필요한 애플리케이션에 적합합니다. 모바일, 웹, 데스크톱 등 다양한 플랫폼을 지원하여 장치 간 일관된 동작을 보장합니다.

사용 사례

  • 노트 앱
  • 콘텐츠 생성 도구
  • 문서 편집기
  • 블로그 작성 인터페이스
  • 마크다운 기반의 채팅 애플리케이션

주요 기능

  • 실시간 마크다운 변환
  • 사용자 정의 가능한 도구 모음
  • 크로스 플랫폼 호환성
  • TextField와의 간단한 통합
  • 모든 주요 플랫폼을 지원합니다

적합한 대상

  • Markdown를 지원하는 폼을 구축하는 개발자
  • 경량 리치 텍스트 편집이 필요한 앱
  • 플랫폼에 관계없이 텍스트 입력이 필요한 프로젝트
  • 직관적인 마크다운 형식 지정을 원하는 사용자

고려 사항

  • 제한된 고급 형식 옵션
  • 내장된 미리보기 모드 없음
  • 복잡한 마크다운 구조를 수동으로 처리해야 합니다
  • 대규모 문서에 최적화되지 않음
  • 도구 모음 사용자 지정에는 기본적인 플러터 지식이 필요합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Markdown Editor Plus

This is a fork of simple_markdown_editor by zahnia88 with contributions from fossfreaks

Simple markdown editor library For flutter. For demo video, you can see it at this url Demo

Features

  • ✅ Convert to Bold, Italic, Strikethrough
  • ✅ Convert to Code, Quote, Links
  • ✅ Convert to Heading (H1, H2, H3).
  • ✅ Convert to unorder list and checkbox list
  • ✅ Support multiline convert
  • ✅ Support auto convert emoji

Usage

Add dependencies to your pubspec.yaml

dependencies:
    markdown_editor_plus: ^latest

Run flutter pub get to install.

How it works

Import library

import 'package:markdown_editor_plus/markdown_editor_plus.dart';

Initialize controller and focus node. These controllers and focus nodes are optional because if you don't create them, the editor will create them themselves

TextEditingController _controller = TextEditingController();

Show widget for editor

// editable text with toolbar by default
MarkdownAutoPreview(
    controller: _controller,
    emojiConvert: true,
)

// editable text without toolbar
MarkdownField(
    controller: _controller,
    emojiConvert: true,
    enableToolBar: false,
)

if you want to parse text into markdown you can use the following widget:

String data = '''
**bold**
*italic*

#hashtag
@mention
'''

MarkdownParse(
    data: data,
    onTapHastag: (String name, String match) {
        // name => hashtag
        // match => #hashtag
    },
    onTapMention: (String name, String match) {
        // name => mention
        // match => #mention
    },
)

In order to set the colors

MarkdownAutoPreview(
    controller: _controller,
    enableToolBar: true,
    emojiConvert: true,
    autoCloseAfterSelectEmoji: false,
    // toolbar's background color, text color will be based on theme
    toolbarBackground: Colors.blue,
    // toolbar's expandable widget colors like headings, ordering
    expandableBackground: Colors.blue[200],
)

카테고리

의존성

의존성 목록 4 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.