Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New changes and improvemenets #1437

Merged
merged 7 commits into from
Oct 19, 2023
Merged
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
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,157 +1,210 @@
# [7.4.14]

- Custom style attrbuites for platforms other than mobile (alignment, margin, width, height)
- Improve performance by reducing the number of widgets rebuilt by listening to media query for only the needed things, for example instead of using `MediaQuery.of(context).size`, now we are using `MediaQuery.sizeOf(context)`
- Bug fixes and other improvemenets
- Add MediaButton for picking the images only since the video one is not ready
- A new feature which allows customizing the text selection in quill editor which is useful for custom theme design system for custom app widget

# [7.4.13]

- Fixed tab editing when in readOnly mode.

# [7.4.12]

- Update the minimum version of device_info_plus to 9.1.0.

# [7.4.11]

- Add sw locale.

# [7.4.10]

- Update translations.

# [7.4.9]

- Style recognition fixes.

# [7.4.8]

- Upgrade dependencies.

# [7.4.7]

- Add Vietnamese and German translations.

# [7.4.6]

- Fix more null errors in Leaf.retain [#1394](https://github.com/singerdmx/flutter-quill/issues/1394) and Line.delete [#1395](https://github.com/singerdmx/flutter-quill/issues/1395).

# [7.4.5]

- Fix null error in Container.insert [#1392](https://github.com/singerdmx/flutter-quill/issues/1392).

# [7.4.4]

- Fix extra padding on checklists [#1131](https://github.com/singerdmx/flutter-quill/issues/1131).

# [7.4.3]

- Fixed a space input error on iPad.

# [7.4.2]

- Fix bug with keepStyleOnNewLine for link.

# [7.4.1]

- Fix toolbar dividers condition.

# [7.4.0]

- Support Flutter version 3.13.0.

# [7.3.3]

- Updated Dependencies conflicting.

# [7.3.2]

- Added builder for custom button in _LinkDialog.

# [7.3.1]

- Added case sensitive and whole word search parameters.
- Added wrap around.
- Moved search dialog to the bottom in order not to override the editor and the text found.
- Other minor search dialog enhancements.

# [7.3.0]

- Add default attributes to basic factory.

# [7.2.19]

- Feat/link regexp.

# [7.2.18]

- Fix paste block text in words apply same style.

# [7.2.17]

- Fix paste text mess up style.
- Add support copy/cut block text.

# [7.2.16]

- Allow for custom context menu.

# [7.2.15]

- Add flutter_quill.delta library which only exposes Delta datatype.

# [7.2.14]

- Fix errors when the editor is used in the `screenshot` package.

# [7.2.13]

- Fix around image can't delete line break.

# [7.2.12]

- Add support for copy/cut select image and text together.

# [7.2.11]

- Add affinity for localPosition.

# [7.2.10]

- LINE._getPlainText queryChild inclusive=false.

# [7.2.9]

- Add toPlainText method to `EmbedBuilder`.

# [7.2.8]

- Add custom button widget in toolbar.

# [7.2.7]

- Fix language code of Japan.

# [7.2.6]

- Style custom toolbar buttons like builtins.

# [7.2.5]

- Always use text cursor for editor on desktop.

# [7.2.4]

- Fixed keepStyleOnNewLine.

# [7.2.3]

- Get pixel ratio from view.

# [7.2.2]

- Prevent operations on stale editor state.

# [7.2.1]

- Add support for android keyboard content insertion.
- Enhance color picker, enter hex color and color palette option.

# [7.2.0]

- Checkboxes, bullet points, and number points are now scaled based on the default paragraph font size.

# [7.1.20]

- Pass linestyle to embedded block.

# [7.1.19]

- Fix Rtl leading alignment problem.

# [7.1.18]

- Support flutter latest version.

# [7.1.17+1]

- Updates `device_info_plus` to version 9.0.0 to benefit from AGP 8 (see [changelog#900](https://pub.dev/packages/device_info_plus/changelog#900)).

# [7.1.16]

- Fixed subscript key from 'sup' to 'sub'.

# [7.1.15]

- Fixed a bug introduced in 7.1.7 where each section in `QuillToolbar` was displayed on its own line.

# [7.1.14]

- Add indents change for multiline selection.

# [7.1.13]

- Add custom recognizer.

# [7.1.12]

- Add superscript and subscript styles.

# [7.1.11]

- Add inserting indents for lines of list if text is selected.

# [7.1.10]

- Image embedding tweaks
- Add MediaButton which is intened to superseed the ImageButton and VideoButton. Only image selection is working.
- Implement image insert for web (image as base64)
Expand All @@ -167,6 +220,7 @@
- Use merging shortcuts and actions correclty (if the key combination is the same)

# [7.1.8]

- Dropdown tweaks
- Add itemHeight, itemPadding, defaultItemColor for customization of dropdown items.
- Remove alignment property as useless.
Expand Down
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,39 @@ It is required to provide `filePickImpl` for toolbar image button, e.g. [Sample
The `QuillToolbar` class lets you customize which formatting options are available.
[Sample Page] provides sample code for advanced usage and configuration.

### Using Custom App Widget

This project use some adaptive widgets like `AdaptiveTextSelectionToolbar` which require the following delegates:

1. Default Material Localizations delegate
2. Default Cupertino Localizations delegate
3. Defualt Widgets Localizations delegate

You don't need to include those since there are defined by default
but if you are using Custom app or you are overriding the `localizationsDelegates` in the App widget
then please make sure it's including those:

```dart
localizationsDelegates: const [
DefaultCupertinoLocalizations.delegate,
DefaultMaterialLocalizations.delegate,
DefaultWidgetsLocalizations.delegate,
],
```

And you might need more depending on your use case, for example if you are using custom localizations for your app, using custom app widget like [FluentApp](https://pub.dev/packages/fluent_ui)
which will also need

```dart
localizationsDelegates: const [
// Required localizations delegates ...
FluentLocalizations.delegate,
AppLocalizations.delegate,
],
```

in addition to the required delegates by this library

### Font Size

Within the editor toolbar, a drop-down with font-sizing capabilities is available. This can be enabled or disabled with `showFontSize`.
Expand Down Expand Up @@ -203,7 +236,7 @@ QuillToolbar.basic(
> For this to work, you need to add the appropriate permissions
> to your `Info.plist` and `AndroidManifest.xml` files.
>
> See https://github.com/natsuk4ze/gal#-get-started to add the needed lines.
> See <https://github.com/natsuk4ze/gal#-get-started> to add the needed lines.

### Custom Size Image for Mobile

Expand Down
2 changes: 0 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.app"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
Expand All @@ -53,7 +52,6 @@ android {

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
Expand Down
8 changes: 7 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />

<uses-feature android:name="android.hardware.camera" android:required="false" />
<application
android:name="${applicationName}"
android:label="app"
Expand Down
24 changes: 12 additions & 12 deletions example/lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,23 +190,23 @@ class _HomePageState extends State<HomePage> {
onTapUp: (details, p1) {
return _onTripleClickSelection();
},
customStyles: DefaultStyles(
customStyles: const DefaultStyles(
h1: DefaultTextBlockStyle(
const TextStyle(
TextStyle(
fontSize: 32,
color: Colors.black,
height: 1.15,
fontWeight: FontWeight.w300,
),
const VerticalSpacing(16, 0),
const VerticalSpacing(0, 0),
VerticalSpacing(16, 0),
VerticalSpacing(0, 0),
null),
sizeSmall: const TextStyle(fontSize: 9),
subscript: const TextStyle(
sizeSmall: TextStyle(fontSize: 9),
subscript: TextStyle(
fontFamily: 'SF-UI-Display',
fontFeatures: [FontFeature.subscripts()],
),
superscript: const TextStyle(
superscript: TextStyle(
fontFamily: 'SF-UI-Display',
fontFeatures: [FontFeature.superscripts()],
),
Expand All @@ -230,18 +230,18 @@ class _HomePageState extends State<HomePage> {
onTapUp: (details, p1) {
return _onTripleClickSelection();
},
customStyles: DefaultStyles(
customStyles: const DefaultStyles(
h1: DefaultTextBlockStyle(
const TextStyle(
TextStyle(
fontSize: 32,
color: Colors.black,
height: 1.15,
fontWeight: FontWeight.w300,
),
const VerticalSpacing(16, 0),
const VerticalSpacing(0, 0),
VerticalSpacing(16, 0),
VerticalSpacing(0, 0),
null),
sizeSmall: const TextStyle(fontSize: 9),
sizeSmall: TextStyle(fontSize: 9),
),
embedBuilders: [
...defaultEmbedBuildersWeb,
Expand Down
Loading