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

feat!: release version 11.0.0 with breaking changes #2338

Merged
merged 99 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
5f2058d
fix: remove super_clipboard from flutter_quill_extensions and move it…
EchoEllet Oct 17, 2024
b66c331
chore: merge origin/master and solve conflicts
EchoEllet Oct 17, 2024
fd6fa50
chore: remove controller from configuration class, remove the quill t…
EchoEllet Oct 22, 2024
76eced4
chore: remove SimpleSpellCheckerService from flutter_quill_extensions
EchoEllet Oct 22, 2024
b437e84
chore: remove experimental support for spell checking, remove the dep…
EchoEllet Oct 22, 2024
af5a173
Merge remote-tracking branch 'origin/master' into release/v11
EchoEllet Oct 22, 2024
a0ae142
chore(deps): remove equatable
EchoEllet Oct 22, 2024
bc6b6b8
chore: remove quill shared confiugration and toolbar shared configura…
EchoEllet Oct 22, 2024
fa75407
chore: remove QuillController.setContents()
EchoEllet Oct 22, 2024
6149dc1
chore: remove QuillController.editorFocusNode
EchoEllet Oct 22, 2024
0a05f02
chore: remove outdated comments
EchoEllet Oct 22, 2024
a127628
chore: always call setState() in _markNeedsBuild() in QuillRawEditorS…
EchoEllet Oct 22, 2024
ec24661
chore: extract code from _requestKeyboard() and add docs comment for …
EchoEllet Oct 22, 2024
1c10cd0
chore: remove classes related to editor element options, minor docs u…
EchoEllet Oct 22, 2024
5621671
chore: rename 'Configurations' to 'Config'
EchoEllet Oct 23, 2024
3c6d1dc
chore: refactor build method of embed block interface
EchoEllet Oct 23, 2024
bff8f70
chore: remove the experimental table support from flutter_quill_exten…
EchoEllet Oct 23, 2024
bf6380c
chore: remove old deprecated properties
EchoEllet Oct 23, 2024
419703c
chore: rename rawItemsMap to items for font family and font size options
EchoEllet Oct 23, 2024
86254dd
chore: remove deprecated formula embed support from flutter_quill_ext…
EchoEllet Oct 23, 2024
0ec8c88
chore: merge origin/master and fix conflicts with https://github.com/…
EchoEllet Oct 23, 2024
5a97bd3
chore: remove deprecated class SuperClipboardService, rename the dire…
EchoEllet Oct 23, 2024
1799693
chore: add commnet in imageProviderBuilder code docs comment in flutt…
EchoEllet Oct 23, 2024
78f614f
docs: fix typos in migration
EchoEllet Oct 23, 2024
4efb996
Merge remote-tracking branch 'origin/master' into release/v11
EchoEllet Oct 23, 2024
0616ce0
docs(readme): replace deprecated flutter_quill_internal.dart with int…
EchoEllet Oct 23, 2024
1e4a77a
docs(readme): improve README
EchoEllet Oct 23, 2024
69f3235
docs(readme): add the GitHub flutter_quill code snippet back
EchoEllet Oct 23, 2024
7514119
docs: add more details to the migration guide
EchoEllet Oct 24, 2024
f183ff0
fix(ios): use the localized strings for 'open', 'copy', and 'remove'
EchoEllet Oct 24, 2024
eed5629
chore: rename the file quill_controller_configurations.dart to quill_…
EchoEllet Oct 24, 2024
13563b5
chore: avoid storing quill editor config inside Document
EchoEllet Oct 26, 2024
3525ffc
chore: restore search within embed objects feature (revert removal of…
EchoEllet Oct 26, 2024
c34646c
chore: add @experimental to some APIs
EchoEllet Oct 26, 2024
d12e028
docs: add emojis to the migration guide, add the migration guide link…
EchoEllet Oct 26, 2024
d9b572b
chore: removes quill controller web files, updates QuillControllerCon…
EchoEllet Oct 26, 2024
4287bca
docs: fix typos in the migration guide
EchoEllet Oct 26, 2024
e8e5bbc
Merge remote-tracking branch 'origin/master' into release/v11
EchoEllet Oct 26, 2024
a3afaf1
chore: minor change in the migration guide
EchoEllet Oct 26, 2024
9ada73e
docs: update link of QuillControllerConfig.onClipboardPaste in the mi…
EchoEllet Oct 26, 2024
403a450
chore: fix dart analysis issues
EchoEllet Oct 27, 2024
46c890d
chore: mark QuillEditorConfig.customLeadingBlockBuilder as experimental
EchoEllet Oct 27, 2024
9e1dcab
chore: avoid exporting OptionalSize
EchoEllet Oct 27, 2024
79a771a
chore: rename _restoreToolbar to _restoreToolbarAfterMagnifier in tex…
EchoEllet Oct 27, 2024
f1a7e57
chore: annotate QuillEditorConfig.magnifierConfiguration as experimental
EchoEllet Oct 27, 2024
b739b70
chore: minor cleanup to magnifier feature
EchoEllet Oct 27, 2024
c18d90c
chore: export missing class, fix https://github.com/singerdmx/flutter…
EchoEllet Oct 27, 2024
5e33aa9
chore: fix dart analysis
EchoEllet Oct 27, 2024
fab53e5
chore(release): temp changes to publish 11.0.0 (will revert changes o…
EchoEllet Oct 27, 2024
56a49a6
chore: add temp dependency_overrides to fix CI failure
EchoEllet Oct 27, 2024
6e67ccb
chore: temp changes to publish 11.0.0-dev.1
EchoEllet Oct 27, 2024
ff1c98a
ci(publish): temp change to fix CI failure
EchoEllet Oct 27, 2024
5690bfc
chore: restore previous publish workflow (revert), update min version…
EchoEllet Oct 27, 2024
f8257ed
chore: revert CHANGELOG.md and publish.yml changes
EchoEllet Oct 27, 2024
95a31af
chore: revert a change in https://github.com/singerdmx/flutter-quill/…
EchoEllet Oct 27, 2024
1bad89c
chore: revert change of reverting the removal of _handles check intro…
EchoEllet Oct 27, 2024
f14dbe6
docs(migration): clarify the removal of the QuillToolbar widget
EchoEllet Oct 30, 2024
176e36e
docs(migration): improve removal of the QuillToolbar section
EchoEllet Oct 30, 2024
2ee4ae6
docs: add the custom toolbar page link in: removal of the QuillToolbar
EchoEllet Oct 30, 2024
0fcfaee
docs: add important info at the top of the migration guide
EchoEllet Oct 30, 2024
1f51935
feat(toolbar): add the base button options feature back, supports flu…
EchoEllet Oct 31, 2024
e22268c
chore: fix analysis warnings
EchoEllet Oct 31, 2024
c87e127
docs: add more details in the migration guide in the breaking behavio…
EchoEllet Oct 31, 2024
3d39c82
chore: minor change to the 'Breaking behavior' section
EchoEllet Oct 31, 2024
dd49060
chore(deps): improve dependencies constraints for compatibility
EchoEllet Nov 3, 2024
746aa3f
docs(migration): explain that QuillToolbar is not a visual widget lik…
EchoEllet Nov 4, 2024
0cc95c8
docs: minor changes to README.md andd migration guide
EchoEllet Nov 5, 2024
fe9dfd3
feat: clipboard paste callbacks, partial fix to https://github.com/si…
EchoEllet Nov 7, 2024
837adf0
docs: update outdated link in the migration guide
EchoEllet Nov 7, 2024
f1d06e3
chore: rename deltaToPaste() to getDeltaToPaste()
EchoEllet Nov 7, 2024
76b5564
docs: improve CHANGELOG.md format and quality, fixing https://github.…
EchoEllet Nov 8, 2024
47ac56f
ci: pass the GitHub token to an action
EchoEllet Nov 8, 2024
d62211a
docs: fix format of CHANGELOG.md
EchoEllet Nov 8, 2024
1144018
ci: use cider for CHANGELOG.md format validation
EchoEllet Nov 8, 2024
39ca2d6
ci: add a TODO to improve CHANGELOG.md validation
EchoEllet Nov 8, 2024
7de1d88
chore: remove flutter_quill_extensions from publishing
EchoEllet Nov 8, 2024
c204de7
chore: publish flutter_quill_extensions and add 'insertVideo' in quil…
EchoEllet Nov 8, 2024
55b9d34
chore(release): prepare to publish 11.0.0-dev.3
EchoEllet Nov 8, 2024
02b30e0
ci: increase _expectedTranslationKeysLength due to 'insertVideo'
EchoEllet Nov 8, 2024
1fb1937
ci: use a GitHub action to update the release notes
EchoEllet Nov 8, 2024
2ae5bef
chore(release): publish flutter_quill_extensions 11.0.0-dev.3
EchoEllet Nov 8, 2024
8750e64
chore(release): prepare to publish 11.0.0-dev.4
EchoEllet Nov 8, 2024
1cc4c4b
ci: remove the release notes file creation
EchoEllet Nov 8, 2024
25a45ed
chore(example): delete the current example to recreate
EchoEllet Nov 8, 2024
8a8abbd
chore: recreate the example (fix https://github.com/singerdmx/flutter…
EchoEllet Nov 8, 2024
49e0d98
docs(readme): update the screenshots of the example app
EchoEllet Nov 8, 2024
79ccfe8
docs(readme): update sample page link, remove 'breaking changes' from…
EchoEllet Nov 8, 2024
7ccd692
feat: add the option to disable rich text paste feature, partial fix …
EchoEllet Nov 8, 2024
2c33a55
chore(release): prepare to publish 11.0.0-dev.5
EchoEllet Nov 8, 2024
c01525c
Merge remote-tracking branch 'origin/master' into release/v11
EchoEllet Nov 8, 2024
0d4ecbc
chore: regenerate translations to reflect https://github.com/singerdm…
EchoEllet Nov 8, 2024
5d561d6
chore: ignore deprecations
EchoEllet Nov 8, 2024
20f3a60
docs: fix minor issue in Contributing guide
EchoEllet Nov 9, 2024
9e2a730
chore(example): add file read access for macOS
EchoEllet Nov 9, 2024
09a4aa9
ci(publish): first attemp to automate the CHANGELOG.md change while c…
EchoEllet Nov 9, 2024
df5352f
feat(l10n): localize "insert video" for Khmer language
EchoEllet Nov 9, 2024
e5c4d45
chore: simplify PR template
EchoEllet Nov 9, 2024
30a88bb
docs: update development notes
EchoEllet Nov 9, 2024
4ac4611
docs(readme): use images from GitHub repo instead of relative path to…
EchoEllet Nov 9, 2024
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
1,444 changes: 726 additions & 718 deletions CHANGELOG.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CHANGELOG_DATA.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"11.0.0-dev.1": "This release is identical to [11.0.0-dev.0](https://github.com/singerdmx/flutter-quill/releases/tag/v11.0.0-dev.0), mainly published to update the min published version (from pub.dev) of `flutter_quill` in `flutter_quill_test` and `flutter_quill_extensions`.\n\nSee the [migration guide](https://github.com/singerdmx/flutter-quill/blob/release/v11/doc/migration/10_to_11.md).\n\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v11.0.0-dev.0...v11.0.0-dev.1",
"10.8.5": "* fix: allow all correct URLs to be formatted by @orevial in https://github.com/singerdmx/flutter-quill/pull/2328\r\n* fix(macos): Implement actions for ExpandSelectionToDocumentBoundaryIntent and ExpandSelectionToLineBreakIntent to use keyboard shortcuts, unrelated cleanup to the bug fix. by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2279\r\n\r\n## New Contributors\r\n* @orevial made their first contribution at https://github.com/singerdmx/flutter-quill/pull/2328\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.8.4...v10.8.5",
"10.8.4": "- [Fixes an unhandled exception](https://github.com/singerdmx/flutter-quill/commit/8dd559b825030d29b30b32b353a08dcc13dc42b7) in case `getClipboardFiles()` wasn't supported\r\n- [Updates min version](https://github.com/singerdmx/flutter-quill/commit/49569e47b038c5f61b7521571c102cf5ad5a0e3f) of internal dependency `quill_native_bridge`\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.8.3...v10.8.4",
"10.8.3": "This release is identical to [v10.8.3-dev.0](https://github.com/singerdmx/flutter-quill/releases/tag/v10.8.3-dev.0), mainly published to bump the minimum version of [flutter_quill](https://pub.dev/packages/flutter_quill) in [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) and to publish [quill-super-clipboard](https://github.com/FlutterQuill/quill-super-clipboard/).\r\n\r\nA new identical release `10.9.0` will be published soon with a release description.\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.8.2...v10.8.3",
Expand Down
111 changes: 47 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ You can join our [Slack Group] for discussion.

- [📸 Screenshots](#-screenshots)
- [📦 Installation](#-installation)
- [🛠 Platform Specific Configurations](#-platform-specific-configurations)
- [🛠 Platform Setup](#-platform-setup)
- [🚀 Usage](#-usage)
- [💥 Breaking Changes](#-breaking-changes)
- [🔤 Input / Output](#-input--output)
Expand Down Expand Up @@ -83,9 +83,8 @@ You can join our [Slack Group] for discussion.

## 📦 Installation

```yaml
dependencies:
flutter_quill: ^<latest-version-here>
```shell
flutter pub add flutter_quill
```

<p align="center">OR</p>
Expand All @@ -99,13 +98,9 @@ dependencies:
```

> [!TIP]
> Using the latest version and reporting any issues you encounter on GitHub will greatly contribute to the improvement
> of the library.
> Your input and insights are valuable in shaping a stable and reliable version for all the developers. Thank you for
> being part of the open-source community!
>
> If you're using version `10.0.0`, see [the migration guide to migrate to `11.0.0`](https://github.com/singerdmx/flutter-quill/blob/master/doc/migration/10_to_11.md).

## 🛠 Platform Specific Configurations
## 🛠 Platform Setup

The `flutter_quill` package uses the following plugins:

Expand Down Expand Up @@ -158,29 +153,45 @@ Create the file `your_project/android/app/src/main/res/xml/file_paths.xml` with

> [!NOTE]
> Starting with Flutter Quill `10.8.4`, [super_clipboard](https://pub.dev/packages/super_clipboard) is no longer required in `flutter_quill` or `flutter_quill_extensions`.
> The new default is an internal plugin, [`quill_native_bridge`](https://pub.dev/packages/quill_native_bridge).
> The new default is an internal plugin [`quill_native_bridge`](https://pub.dev/packages/quill_native_bridge).
> If you want to continue using `super_clipboard`, you can use the [quill_super_clipboard](https://pub.dev/packages/quill_super_clipboard) package (support may be discontinued).

## 🚀 Usage

Add the localization delegate to your app widget:

```dart
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

MaterialApp(
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
FlutterQuillLocalizations.delegate,
],
);
```

Instantiate a controller:

```dart
QuillController _controller = QuillController.basic();
```

Use the `QuillEditor`, and `QuillSimpleToolbar` widgets,
Use the `QuillEditor` and `QuillSimpleToolbar` widgets,
and attach the `QuillController` to them:

```dart
QuillSimpleToolbar(
controller: _controller,
configurations: const QuillSimpleToolbarConfigurations(),
config: const QuillSimpleToolbarConfig(),
),
Expanded(
child: QuillEditor.basic(
controller: _controller,
configurations: const QuillEditorConfigurations(),
config: const QuillEditorConfig(),
),
)
```
Expand All @@ -207,7 +218,7 @@ as they may be altered even in minor versions.
and [`@visibleForTesting`](https://api.flutter.dev/flutter/meta/visibleForTesting-constant.html) are not intended for
public use and should be avoided entirely.

- The `package:flutter_quill/flutter_quill_internal.dart` expose internal APIs
- The `package:flutter_quill/internal.dart` expose internal APIs
to be used by other related packages and should be avoided when possible.

We make every effort to ensure internal APIs are not exported by default. Use experimental features at your own discretion.
Expand All @@ -216,16 +227,8 @@ We recommend checking the `CHANGELOG.md` or release notes for each update to sta

## 🔤 Input / Output

This library uses [Quill Delta](https://quilljs.com/docs/delta/)
to represent the document content.
The Delta format is a compact and versatile way to describe document changes.
It consists of a series of operations, each representing an insertion, deletion,
or formatting change within the document.

> [!NOTE]
> Don’t be confused by its name Delta—Deltas represents both documents and changes to documents.
> If you think of Deltas as the instructions for going from one document to another,
> the way Deltas represents a document is by expressing the instructions starting from an empty document.
This library utilizes [Quill Delta](https://quilljs.com/docs/delta/) to represent document content.
The Delta format is a compact and versatile method for describing document changes through a series of operations that denote insertions, deletions, or formatting changes.

* Use `_controller.document.toDelta()` to extract the deltas.
* Use `_controller.document.toPlainText()` to extract plain text.
Expand All @@ -248,10 +251,6 @@ _controller.document = Document.fromJson(json);

- [Quill Delta](https://quilljs.com/docs/delta/)
- [Quill Delta Formats](https://quilljs.com/docs/formats)
- [Why Quill](https://quilljs.com/guides/why-quill/)
- [Quill JS Configurations](https://quilljs.com/docs/configuration/)
- [Quill JS Interactive Playground](https://quilljs.com/playground/)
- [Quill JS GitHub repo](https://github.com/quilljs/quill)

## ⚙️ Configurations

Expand Down Expand Up @@ -296,42 +295,16 @@ of [FlutterQuill Extensions]
## 🔄 Conversion to HTML

> [!CAUTION]
> **Converting HTML or Markdown to Delta is highly experimental and shouldn't be used for production applications**,
> while the current implementation we have internally is far from perfect, it could improved however **it will likely
not
work as expected**, due to differences between **HTML** and **Delta**, see
> this [Quill JS Comment #311458570](https://github.com/slab/quill/issues/1551#issuecomment-311458570) for more
> info.<br>
> We only use it **internally** as it is more suitable for our specific use case, copying content from external websites
> and pasting it into the editor
> previously breaks the styles, while the current implementation is not designed for converting a **full Document** from
> other formats to **Delta**, it provides a better user experience and doesn't have many downsides.
> Converting **HTML** to **Delta** is generally not recommended due to structural and functional differences between HTML and Delta ([see this comment](https://github.com/slab/quill/issues/1551#issuecomment-311458570)).
> We highly recommend storing the **Document** as **Delta JSON**
> in the database instead of other formats (e.g., HTML, Markdown, PDF, Microsoft Word, Google Docs, Apple Pages, XML, CSV, etc...)
>
> The support for converting HTML to **Quill Delta** is quite experimental and used internally when
> pasting HTML content from the clipboard to the Quill Document.
> The support for converting HTML (from external websites and apps) to **Quill Delta** is used internally when
> pasting HTML content from the clipboard to the document.
>
> Converting **Delta** from/to **HTML** is not a standard feature in [Quill JS](https://github.com/slab/quill)
> or [FlutterQuill].

> [!IMPORTANT]
> Converting **HTML** to **Delta** usually won't work as expected, we highly recommend storing the **Document** as *
*Delta JSON**
> in the database instead of other formats (e.g., HTML, Markdown, PDF, Microsoft Word, Google Docs, Apple Pages, XML,
> CSV,
> etc...)
>
> Converting between **HTML** and **Delta** JSON is generally not recommended due to their structural and functional
> differences.
>
> Sometimes you might want to convert between **HTML** and **Delta** for specific use cases:
>
> 1. **Migration**: If you're using an existing system that stores the data in HTML and want to convert the document
data to **Delta**.
> 2. **Sharing**: For example, if you want to share the Document **Delta** somewhere or send it as an email.
> 3. **Save as**: If your app has a feature that allows converting Documents to other formats.
> 4. **Rich text pasting**: If you copy some content from websites or apps, and want to paste it into the app.
> 5. **SEO**: In case you want to use HTML for SEO support.

The following packages can be used:

1. [`vsc_quill_delta_to_html`](https://pub.dev/packages/vsc_quill_delta_to_html): To convert **Delta**
Expand All @@ -340,6 +313,16 @@ The following packages can be used:
3. [`flutter_quill_to_pdf`](https://pub.dev/packages/flutter_quill_to_pdf): To convert **Delta** To **PDF**.
4. [`markdown_quill`](https://pub.dev/packages/markdown_quill): To convert **Markdown** To **Delta** and vice versa.

> [!TIP]
> You might want to convert between **HTML** and **Delta** for some use cases:
>
> 1. **Migration**: If you're using an existing system that stores the data in HTML and want to convert the document
data to **Delta**.
> 2. **Sharing**: For example, if you want to share the Document **Delta** somewhere or send it as an email.
> 3. **Save as**: If your app has a feature that allows converting Documents to other formats.
> 4. **Rich text pasting**: If you copy some content from websites or apps, and want to paste it into the app.
> 5. **SEO**: In case you want to use HTML for SEO support.

## 📝 Spelling checker

This feature is currently not implemented and is being planned. Refer to [#2246](https://github.com/singerdmx/flutter-quill/issues/2246)
Expand All @@ -357,7 +340,7 @@ The plugin [`quill_native_bridge`](https://pub.dev/packages/quill_native_bridge)

## ✂️ Shortcut events

We can customize some Shorcut events, using the parameters `characterShortcutEvents` or `spaceShortcutEvents` from `QuillEditorConfigurations` to add more functionality to our editor.
We can customize some Shorcut events, using the parameters `characterShortcutEvents` or `spaceShortcutEvents` from `QuillEditorConfig` to add more functionality to the editor.

> [!NOTE]
>
Expand All @@ -367,16 +350,16 @@ To see an example of this, you can check [customizing_shortcuts](./doc/customizi

## 🌐 Translation

The package offers translations for the quill toolbar and editor, it will follow the system locale unless you set your
The package offers translations for the toolbar and editor widgets, it will follow the system locale unless you set your
own locale.

Open this [page](./doc/translation.md) for more info
See the [translation](./doc/translation.md) page for more info

## 🧪 Testing

Take a look at [flutter_quill_test](https://pub.dev/packages/flutter_quill_test) for testing.

Notice that currently, the support for testing is limited.
Currently, the support for testing is limited.

## 🤝 Contributing

Expand Down
6 changes: 3 additions & 3 deletions doc/attribute_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ class HighlightAttr extends Attribute<bool?> {

##### Where should we add this `HighlightAttr`?

On `QuillEditor` or `QuillEditorConfigurations` **doesn't exist** a param that let us pass our `Attribute`
implementations. To make this more easy, we can use just `customStyleBuilder` param from `QuillEditorConfigurations`,
On `QuillEditor` or `QuillEditorConfig` **doesn't exist** a param that let us pass our `Attribute`
implementations. To make this more easy, we can use just `customStyleBuilder` param from `QuillEditorConfig`,
that let us define a function to return a `TextStyle`. With this, we can define now our `HighlightAttr`

##### The editor

```dart
QuillEditor.basic(
controller: controller,
configurations: QuillEditorConfigurations(
config: QuillEditorConfig(
customStyleBuilder: (Attribute<dynamic> attribute) {
if (attribute.key.equals(highlightKey)) {
return TextStyle(color: Colors.black, backgroundColor: Colors.yellow);
Expand Down
11 changes: 5 additions & 6 deletions doc/configurations/custom_buttons.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Custom `QuillToolbar` Buttons ✨
# Custom `QuillSimpleToolbar` Buttons ✨

You may add custom buttons to the _end_ of the toolbar, via the `customButtons` option, which is a `List`
of `QuillToolbarCustomButtonOptions`.

## Adding an Icon 🖌️

To add an Icon, we should use a new `QuillToolbarCustomButtonOptions` class
To add an Icon:

```dart
QuillToolbarCustomButtonOptions(
icon: const Icon(Icons.ac_unit),
tooltip: '',
tooltip: 'Tooltip',
onPressed: () {},
afterButtonPressed: () {},
),
```

Expand All @@ -21,9 +20,9 @@ To add an Icon, we should use a new `QuillToolbarCustomButtonOptions` class
Each `QuillCustomButton` is used as part of the `customButtons` option as follows:

```dart
QuillToolbar.simple(
QuillSimpleToolbar(
controller: _controller,
configurations: QuillSimpleToolbarConfigurations(
config: QuillSimpleToolbarConfig(
customButtons: [
QuillToolbarCustomButtonOptions(
icon: const Icon(Icons.ac_unit),
Expand Down
25 changes: 20 additions & 5 deletions doc/configurations/font_size.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
# 🔠 Font Size

Within the editor toolbar, a drop-down with font-sizing capabilities is available.
This can be enabled or disabled
with `showFontSize`.
This can be enabled or disabled with `showFontSize`.

When enabled, the default font-size values can be modified via _optional_ `fontSizeValues`.
When enabled, the default font-size values can be modified via _optional_ `rawItemsMap`.
Accepts a `Map<String, String>` consisting of a `String` title for the font size and a `String` value for the font size.
Example:

```dart
fontSizeValues: const {'Small': '8', 'Medium': '24.5', 'Large': '46'}
QuillSimpleToolbar(
config: const QuillSimpleToolbarConfig(
buttonOptions: QuillSimpleToolbarButtonOptions(
fontSize: QuillToolbarFontSizeButtonOptions(
items: {'Small': '8', 'Medium': '24.5', 'Large': '46'},
),
),
),
);
```

Font size can be cleared with a value of `0`, for example:

```dart
fontSizeValues: const {'Small': '8', 'Medium': '24.5', 'Large': '46', 'Clear': '0'}
QuillSimpleToolbar(
config: const QuillSimpleToolbarConfig(
buttonOptions: QuillSimpleToolbarButtonOptions(
fontSize: QuillToolbarFontSizeButtonOptions(
items: {'Small': '8', 'Medium': '24.5', 'Large': '46', 'Clear': '0'},
),
),
),
);
```
23 changes: 3 additions & 20 deletions doc/configurations/localizations_setup.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
# 🌍 Localizations Setup

In addition to the required delegates mentioned above in [Using custom app widget](./using_custom_app_widget.md),
which are:
The required localization delegates:

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

Which are used by Flutter widgets.

📌 Note: The library also needs the `FlutterQuillLocalizations.delegate`:

```dart
// Required localizations delegates ...
FlutterQuillLocalizations.delegate
```

**You don't have to add this explicitly** because we have wrapped the `QuillEditor` and `QuillToolbar` with
`FlutterQuillLocalizationsWidget`.
This widget will check if the necessary localizations are set; if not, it will
provide them only for these widgets.
Therefore, it's not strictly required.
However, if you are overriding the
`localizationsDelegates`, you can also add the `FlutterQuillLocalizations.delegate`.

📄 For additional notes, refer to the [Translation](../translation.md) section.
8 changes: 4 additions & 4 deletions doc/configurations/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Use the 3 vertical dots icon to turn on case-sensitivity or whole word constrain
## Search configuration options

By default, the content of Embed objects are not searched.
You can enable search by setting the [searchEmbedMode] in searchConfigurations:
You can enable search by setting the [searchEmbedMode] in `searchConfig`:

```dart
MyQuillEditor(
QuillEditor.basic(
controller: _controller,
configurations: QuillEditorConfigurations(
searchConfigurations: const QuillSearchConfigurations(
config: QuillEditorConfig(
searchConfig: const QuillSearchConfig(
searchEmbedMode: SearchEmbedMode.plainText,
),
),
Expand Down
16 changes: 1 addition & 15 deletions doc/configurations/using_custom_app_widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,5 @@ localizationsDelegates: const [
],
```

📄 For additional notes, see the [localizations setup](./localizations_setup.md) page.

You might need more depending on your use case. For example, if you are using custom localizations for your app with a custom app widget like `FluentApp` from [FluentUI], you will also need:

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

📌 Note: In recent versions of `FluentApp`, you no longer need to add the `localizationsDelegates`. This is just an example. For more information, refer to the [#946](https://github.com/bdlukaa/fluent_ui/pull/946).

📄 For additional notes, see the [Localizations](./localizations_setup.md) page.

[FluentUI]: https://pub.dev/packages/fluent_ui
Loading