Rich text editor for Flutter
Flutter Quill is a rich text editor and a [Quill] component for [Flutter].
This library is a WYSIWYG (What You See Is What You Get) editor built for the modern Android, iOS, web and desktop platforms.
Check out our [Youtube Playlist] or Code Introduction to take a detailed walkthrough of the code base. You can join our [Slack Group] for discussion.
flutter pub add flutter_quill
OR
dependencies:
flutter_quill:
git:
url: https://github.com/singerdmx/flutter-quill.git
ref: v<latest-version-here>
[!TIP] If you're using version
10.0.0, see the migration guide to migrate to11.0.0.
The flutter_quill package uses the following plugins:
url_launcher: to open links.quill_native_bridge: to access platform-specific APIs for the
editor.flutter_keyboard_visibility_temp_fork to listen for keyboard
visibility changes.quill_native_bridgeTo support copying images to the clipboard to be accessed by other apps, you need to configure your Android project. If not set up, a warning will appear in the log during debug mode only.
[!TIP] This is only required on Android for this optional feature. You should be able to copy images and paste them inside the editor without any additional configuration.
1. Update AndroidManifest.xml
Open android/app/src/main/AndroidManifest.xml and add the following inside the <application> tag:
<manifest>
<application>
...
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
...
</application>
</manifest>
2. Create file_paths.xml
Create the file android/app/src/main/res/xml/file_paths.xml with the following content:
<paths>
<cache-path name="cache" path="." />
</paths>
[!NOTE] Starting with Flutter Quill
10.8.4, super_clipboard is no longer required influtter_quillorflutter_quill_extensions. The new default is an internal pluginquill_native_bridge. If you want to continue usingsuper_clipboard, you can use the quill_super_clipboard package (support may be discontinued).
Add the localization delegate to your app widget:
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:
QuillController _controller = QuillController.basic();
Use the QuillEditor and QuillSimpleToolbar widgets,
and attach the QuillController to them:
QuillSimpleToolbar(
controller: _controller,
config: const QuillSimpleToolbarConfig(),
),
Ex
Migrate to the standalone material_ui package
https://github.com/singerdmx/flutter-quill/issues/2789
Labels: enhancement
[Web] Right click in the editor resets the selection; browser context menu Copy/Cut do nothing, Paste goes to the end
https://github.com/singerdmx/flutter-quill/issues/2788
Labels: bug
Windows: viewport jumps on Alt+Tab return or clicking back into editor
https://github.com/singerdmx/flutter-quill/issues/2785
Labels: bug
First, we would like to thank you for your time and efforts on this project, we appreciate it.
[!IMPORTANT] At this time, we prioritize bug fixes and code quality improvements over new features. Please refrain from submitting large changes to add new features, as they might not be merged, and exceptions may made. We encourage you to create an issue or reach out beforehand, explaining your proposed changes and their rationale for a higher chance of acceptance. Thank you!
[!NOTE] The package version in
pubspec.yamlshould not be modified; this will be handled by a maintainer or CI. Add updates toUnreleasedinCHANGELOG.mdfollowing Keep a Changelog format.
flutter --version and dart --version workMake sure you have the Requirement installed and configured correctly
To test your changes:
flutter runCode Style and Formatting:
Adhere to the Dart Coding Conventions (https://dart.dev/effective-dart). Use consistent naming conventions for variables, functions, classes, etc. Follow a consistent code formatting style throughout the project.
We use Dart lints to make the process easier.
Documentation:
Document public APIs using Dart comments (https://dart.dev/effective-dart/documentation). Provide comprehensive documentation for any complex algorithms, data structures, or significant functionality. Write clear and concise commit messages and pull request descriptions.
Performance:
Write efficient code and avoid unnecessary overhead. Profile the application for performance bottlenecks and optimize critical sections if needed.
Bundle size:
Try to make the package size as less as possible but as much as needed
Code Review:
Encourage code reviews for all changes to maintain code quality and catch potential issues early. Use pull requests and code reviews to discuss proposed changes and improvements.
Versioning and Releases:
Follow semantic versioning for releases (https://semver.org/). Clearly document release notes and changes for each version.
For now, we might introduce breaking changes in a non-major version but will always provide a migration guide in each release info.
Consistency:
Adhere to a consistent coding style throughout the project for improvement readability and maintainability
Meaningful Names:
Use descriptive variable, class, and function names that clearly convey their purpose.
Testing:
Try to write tests (Widget or Unit tests or other types or tests) when possible
CHANGELOG.md to add the changes in the Unreleased per Keep a Changelog format.