Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [2.0.4] - 2022/05/14

* Added cursorColor
* Added null check for boxDecoration

## [2.0.3] - 2022/05/14

* Added customizations for decoration of TextFormField
* Added separator between TextFormField and Actions

## [2.0.2] - 2021/10/26

* Add a controller parameter
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
MarkdownEditableTextInput is a TextField Widget that allow you to convert easily what's in the TextField to Markdown.

## Features
- [x] Customization of input and actions
- [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

## Demo
![](pictures/test_edition.gif)
![](pictures/preview.gif)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please do the same GIF as there was previously (one that show all the formatting options)


## Usage
The color of the MarkdownTextInput is defined by the color set in your Theme :
Expand All @@ -35,5 +36,3 @@ The color of the MarkdownTextInput is defined by the color set in your Theme :

### Example
You can see an example of how to use this package [here](https://github.com/playmoweb/markdown-editable-textinput/tree/master/example)


4 changes: 2 additions & 2 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -135,7 +135,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
44 changes: 40 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class _MyAppState extends State<MyApp> {
home: Theme(
data: ThemeData(
primaryColor: const Color(0xFF2C1C6B),
colorScheme: ColorScheme.light().copyWith(secondary: const Color(0xFF200681)),
colorScheme:
ColorScheme.light().copyWith(secondary: const Color(0xFF200681)),
cardColor: const Color(0xFFF8F9FC),
textTheme: const TextTheme(bodyText2: TextStyle(fontSize: 20)),
),
Expand All @@ -51,11 +52,46 @@ class _MyAppState extends State<MyApp> {
children: <Widget>[
MarkdownTextInput(
(String value) => setState(() => description = value),
description,
label: 'Description',
maxLines: 10,
actions: MarkdownType.values,
controller: controller,
actionsBoxDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.lightBlue),
),
actions: MarkdownType.values,
fillActions: false,
inputDecoration: InputDecoration(
hintText:
'I have been working for the weekend, but this weekend never came..',
hintStyle: TextStyle(
color: Colors.grey,
fontSize: 16,
fontWeight: FontWeight.w400,
),
errorStyle: TextStyle(
color: Colors.red,
fontSize: 14,
fontWeight: FontWeight.w600,
),
hintMaxLines: 2,
errorMaxLines: 2,
fillColor: Colors.white,
border: OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: Color(0xFF5856D6),
),
borderRadius: BorderRadius.circular(15),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: Color(0xFF5856D6),
),
borderRadius: BorderRadius.circular(15),
),
contentPadding: const EdgeInsets.all(20),
),
),
TextButton(
onPressed: () {
Expand Down
40 changes: 20 additions & 20 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand All @@ -49,7 +49,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -77,7 +77,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -89,7 +89,7 @@ packages:
name: flutter_markdown
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.7"
version: "0.6.10"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -101,21 +101,28 @@ packages:
name: markdown
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "5.0.0"
markdown_editable_textinput:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.0.1"
version: "2.0.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
meta:
dependency: transitive
description:
Expand All @@ -129,7 +136,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -141,7 +148,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -176,21 +183,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.4.9"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.0.0"
5 changes: 1 addition & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@ dependencies:
cupertino_icons: ^0.1.2
markdown_editable_textinput:
path: ../
flutter_markdown: ^0.6.7

flutter_markdown: ^0.6.10

dev_dependencies:
flutter_test:
sdk: flutter


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down
Loading