diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac1caa1..24ed8a4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.3.9 +* fix: MD Parsing for multi space +* fix: FontFamily and FontSize toolbars track the text selected in the editor +* feat: Add checkBoxReadOnly property which can override readOnly for checkbox + ## 9.3.8 * fix: removed misleading parameters * fix: added missed translations for ru, es, de diff --git a/dart_quill_delta/CHANGELOG.md b/dart_quill_delta/CHANGELOG.md index 8ac1caa1..24ed8a4e 100644 --- a/dart_quill_delta/CHANGELOG.md +++ b/dart_quill_delta/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.3.9 +* fix: MD Parsing for multi space +* fix: FontFamily and FontSize toolbars track the text selected in the editor +* feat: Add checkBoxReadOnly property which can override readOnly for checkbox + ## 9.3.8 * fix: removed misleading parameters * fix: added missed translations for ru, es, de diff --git a/dart_quill_delta/pubspec.yaml b/dart_quill_delta/pubspec.yaml index f603e06c..62441a0f 100644 --- a/dart_quill_delta/pubspec.yaml +++ b/dart_quill_delta/pubspec.yaml @@ -1,6 +1,6 @@ name: dart_quill_delta description: A port of quill-js-delta from typescript to dart -version: 9.3.8 +version: 9.3.9 homepage: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/ repository: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/flutter_quill_extensions/CHANGELOG.md b/flutter_quill_extensions/CHANGELOG.md index 8ac1caa1..24ed8a4e 100644 --- a/flutter_quill_extensions/CHANGELOG.md +++ b/flutter_quill_extensions/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.3.9 +* fix: MD Parsing for multi space +* fix: FontFamily and FontSize toolbars track the text selected in the editor +* feat: Add checkBoxReadOnly property which can override readOnly for checkbox + ## 9.3.8 * fix: removed misleading parameters * fix: added missed translations for ru, es, de diff --git a/flutter_quill_extensions/pubspec.yaml b/flutter_quill_extensions/pubspec.yaml index c408d849..f251c6a4 100644 --- a/flutter_quill_extensions/pubspec.yaml +++ b/flutter_quill_extensions/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill_extensions description: Embed extensions for flutter_quill including image, video, formula and etc. -version: 9.3.8 +version: 9.3.9 homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/ repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/flutter_quill_test/pubspec.yaml b/flutter_quill_test/pubspec.yaml index 8da25861..c51881e5 100644 --- a/flutter_quill_test/pubspec.yaml +++ b/flutter_quill_test/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill_test description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases. -version: 9.3.8 +version: 9.3.9 homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/ repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/lib/src/models/config/editor/editor_configurations.dart b/lib/src/models/config/editor/editor_configurations.dart index cb64336a..d3f72b0c 100644 --- a/lib/src/models/config/editor/editor_configurations.dart +++ b/lib/src/models/config/editor/editor_configurations.dart @@ -33,6 +33,7 @@ class QuillEditorConfigurations extends Equatable { this.expands = false, this.placeholder, this.readOnly = false, + this.checkBoxReadOnly, this.disableClipboard = false, this.textSelectionThemeData, this.showCursor, @@ -97,6 +98,15 @@ class QuillEditorConfigurations extends Equatable { /// Defaults to `false`. Must not be `null`. final bool readOnly; + /// Override [readOnly] for checkbox. + /// + /// When this is set to `false`, the checkbox can be checked + /// or unchecked while [readOnly] is set to `true`. + /// When this is set to `null`, the [readOnly] value is used. + /// + /// Defaults to `null`. + final bool? checkBoxReadOnly; + /// Disable Clipboard features /// /// when this is set to `true` clipboard can not be used @@ -369,6 +379,7 @@ class QuillEditorConfigurations extends Equatable { QuillController? controller, String? placeholder, bool? readOnly, + bool? checkBoxReadOnly, bool? disableClipboard, bool? scrollable, double? scrollBottomInset, @@ -421,6 +432,7 @@ class QuillEditorConfigurations extends Equatable { controller: controller ?? this.controller, placeholder: placeholder ?? this.placeholder, readOnly: readOnly ?? this.readOnly, + checkBoxReadOnly: checkBoxReadOnly ?? this.checkBoxReadOnly, disableClipboard: disableClipboard ?? this.disableClipboard, scrollable: scrollable ?? this.scrollable, scrollBottomInset: scrollBottomInset ?? this.scrollBottomInset, diff --git a/lib/src/models/config/raw_editor/raw_editor_configurations.dart b/lib/src/models/config/raw_editor/raw_editor_configurations.dart index 726dda0f..eb1f9def 100644 --- a/lib/src/models/config/raw_editor/raw_editor_configurations.dart +++ b/lib/src/models/config/raw_editor/raw_editor_configurations.dart @@ -50,6 +50,7 @@ class QuillRawEditorConfigurations extends Equatable { this.scrollable = true, this.padding = EdgeInsets.zero, this.readOnly = false, + this.checkBoxReadOnly, this.disableClipboard = false, this.placeholder, this.onLaunchUrl, @@ -104,6 +105,15 @@ class QuillRawEditorConfigurations extends Equatable { /// Defaults to false. Must not be null. final bool readOnly; + /// Override readOnly for checkbox. + /// + /// When this is set to false, the checkbox can be checked + /// or unchecked while readOnly is set to true. + /// When this is set to null, the readOnly value is used. + /// + /// Defaults to null. + final bool? checkBoxReadOnly; + /// Disable Clipboard features /// /// when this is set to true clipboard can not be used diff --git a/lib/src/packages/quill_markdown/markdown_to_delta.dart b/lib/src/packages/quill_markdown/markdown_to_delta.dart index 76285a15..53194f77 100644 --- a/lib/src/packages/quill_markdown/markdown_to_delta.dart +++ b/lib/src/packages/quill_markdown/markdown_to_delta.dart @@ -117,9 +117,7 @@ class MarkdownToDelta extends Converter _justPreviousBlockExit = false; _listItemIndent = -1; - final lines = const LineSplitter().convert(input); - final mdNodes = markdownDocument.parseLines(lines); - + final mdNodes = markdownDocument.parseInline(input); _topLevelNodes.addAll(mdNodes); for (final node in mdNodes) { diff --git a/lib/src/widgets/editor/editor.dart b/lib/src/widgets/editor/editor.dart index 4c4ea7cb..a68d15ce 100644 --- a/lib/src/widgets/editor/editor.dart +++ b/lib/src/widgets/editor/editor.dart @@ -235,6 +235,7 @@ class QuillEditorState extends State scrollBottomInset: configurations.scrollBottomInset, padding: configurations.padding, readOnly: configurations.readOnly, + checkBoxReadOnly: configurations.checkBoxReadOnly, disableClipboard: configurations.disableClipboard, placeholder: configurations.placeholder, onLaunchUrl: configurations.onLaunchUrl, diff --git a/lib/src/widgets/quill/text_block.dart b/lib/src/widgets/quill/text_block.dart index 8fb89191..c0b6b187 100644 --- a/lib/src/widgets/quill/text_block.dart +++ b/lib/src/widgets/quill/text_block.dart @@ -74,6 +74,7 @@ class EditableTextBlock extends StatelessWidget { required this.clearIndents, required this.onCheckboxTap, required this.readOnly, + this.checkBoxReadOnly, this.onLaunchUrl, this.customStyleBuilder, this.customLinkPrefixes = const [], @@ -100,6 +101,7 @@ class EditableTextBlock extends StatelessWidget { final bool clearIndents; final Function(int, bool) onCheckboxTap; final bool readOnly; + final bool? checkBoxReadOnly; final List customLinkPrefixes; @override @@ -279,7 +281,7 @@ class EditableTextBlock extends StatelessWidget { return QuillEditorCheckboxPoint( size: fontSize, value: attrs[Attribute.list.key] == Attribute.checked, - enabled: !readOnly, + enabled: !(checkBoxReadOnly ?? readOnly), onChanged: (checked) => onCheckboxTap(line.documentOffset, checked), uiBuilder: defaultStyles.lists?.checkboxUIBuilder, ); diff --git a/lib/src/widgets/raw_editor/raw_editor_state.dart b/lib/src/widgets/raw_editor/raw_editor_state.dart index da636414..957e6186 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state.dart @@ -998,7 +998,8 @@ class QuillRawEditorState extends EditorState void _handleCheckboxTap(int offset, bool value) { final requestKeyboardFocusOnCheckListChanged = widget.configurations.requestKeyboardFocusOnCheckListChanged; - if (!widget.configurations.readOnly) { + if (!(widget.configurations.checkBoxReadOnly ?? + widget.configurations.readOnly)) { _disableScrollControllerAnimateOnce = true; final currentSelection = controller.selection.copyWith(); final attribute = value ? Attribute.checked : Attribute.unchecked; @@ -1074,6 +1075,7 @@ class QuillRawEditorState extends EditorState clearIndents: clearIndents, onCheckboxTap: _handleCheckboxTap, readOnly: widget.configurations.readOnly, + checkBoxReadOnly: widget.configurations.checkBoxReadOnly, customStyleBuilder: widget.configurations.customStyleBuilder, customLinkPrefixes: widget.configurations.customLinkPrefixes, ); diff --git a/pubspec.yaml b/pubspec.yaml index 41926bcf..5ec1de08 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. -version: 9.3.8 +version: 9.3.9 homepage: https://1o24bbs.com/c/bulletjournal/108/ repository: https://github.com/singerdmx/flutter-quill/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/quill_html_converter/CHANGELOG.md b/quill_html_converter/CHANGELOG.md index 8ac1caa1..24ed8a4e 100644 --- a/quill_html_converter/CHANGELOG.md +++ b/quill_html_converter/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.3.9 +* fix: MD Parsing for multi space +* fix: FontFamily and FontSize toolbars track the text selected in the editor +* feat: Add checkBoxReadOnly property which can override readOnly for checkbox + ## 9.3.8 * fix: removed misleading parameters * fix: added missed translations for ru, es, de diff --git a/quill_html_converter/pubspec.yaml b/quill_html_converter/pubspec.yaml index 04dae1c0..e6e766d0 100644 --- a/quill_html_converter/pubspec.yaml +++ b/quill_html_converter/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_html_converter description: A extension for flutter_quill package to add support for dealing with conversion to/from html -version: 9.3.8 +version: 9.3.9 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_html_converter/ repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_html_converter/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/quill_pdf_converter/CHANGELOG.md b/quill_pdf_converter/CHANGELOG.md index 8ac1caa1..24ed8a4e 100644 --- a/quill_pdf_converter/CHANGELOG.md +++ b/quill_pdf_converter/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## 9.3.9 +* fix: MD Parsing for multi space +* fix: FontFamily and FontSize toolbars track the text selected in the editor +* feat: Add checkBoxReadOnly property which can override readOnly for checkbox + ## 9.3.8 * fix: removed misleading parameters * fix: added missed translations for ru, es, de diff --git a/quill_pdf_converter/pubspec.yaml b/quill_pdf_converter/pubspec.yaml index 870b0ca3..611191f6 100644 --- a/quill_pdf_converter/pubspec.yaml +++ b/quill_pdf_converter/pubspec.yaml @@ -1,6 +1,6 @@ name: quill_pdf_converter description: A extension for flutter_quill package to add support for dealing with conversion to pdf -version: 9.3.8 +version: 9.3.9 homepage: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ repository: https://github.com/singerdmx/flutter-quill/tree/master/quill_pdf_converter/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ diff --git a/version.dart b/version.dart index de66619d..c8a06db8 100644 --- a/version.dart +++ b/version.dart @@ -1 +1 @@ -const version = '9.3.8'; +const version = '9.3.9';