Merge remote-tracking branch 'origin/master'

pull/2082/head
AtlasAutocode 9 months ago
commit fd5b86f124
  1. 22
      CHANGELOG.md
  2. 2
      CHANGELOG_DATA.json
  3. 22
      dart_quill_delta/CHANGELOG.md
  4. 2
      dart_quill_delta/pubspec.yaml
  5. 22
      flutter_quill_extensions/CHANGELOG.md
  6. 2
      flutter_quill_extensions/pubspec.yaml
  7. 22
      flutter_quill_test/CHANGELOG.md
  8. 2
      flutter_quill_test/pubspec.yaml
  9. 6
      lib/src/editor/config/editor_configurations.dart
  10. 9
      lib/src/editor/editor.dart
  11. 4
      lib/src/editor/raw_editor/config/raw_editor_configurations.dart
  12. 16
      lib/src/editor/raw_editor/raw_editor_state.dart
  13. 2
      lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart
  14. 19
      lib/src/editor/widgets/text/text_block.dart
  15. 2
      pubspec.yaml

@ -4,6 +4,28 @@
All notable changes to this project will be documented in this file.
## 10.0.9
* Fix: manual checking of directionality by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2063
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.8...v10.0.9
## 10.0.8
* feat: add callback to handle performAction by @huandu in https://github.com/singerdmx/flutter-quill/pull/2061
* fix: Invalid selection when tapping placeholder text by @huandu in https://github.com/singerdmx/flutter-quill/pull/2062
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.7...v10.0.8
## 10.0.7
* Fix: RTL issues by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2060
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.6...v10.0.7
## 10.0.6
* fix: textInputAction is not set when creating QuillRawEditorConfiguration by @huandu in https://github.com/singerdmx/flutter-quill/pull/2057

File diff suppressed because one or more lines are too long

@ -4,6 +4,28 @@
All notable changes to this project will be documented in this file.
## 10.0.9
* Fix: manual checking of directionality by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2063
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.8...v10.0.9
## 10.0.8
* feat: add callback to handle performAction by @huandu in https://github.com/singerdmx/flutter-quill/pull/2061
* fix: Invalid selection when tapping placeholder text by @huandu in https://github.com/singerdmx/flutter-quill/pull/2062
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.7...v10.0.8
## 10.0.7
* Fix: RTL issues by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2060
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.6...v10.0.7
## 10.0.6
* fix: textInputAction is not set when creating QuillRawEditorConfiguration by @huandu in https://github.com/singerdmx/flutter-quill/pull/2057

@ -1,6 +1,6 @@
name: dart_quill_delta
description: A port of quill-js-delta from typescript to dart
version: 10.0.6
version: 10.0.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/

@ -4,6 +4,28 @@
All notable changes to this project will be documented in this file.
## 10.0.9
* Fix: manual checking of directionality by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2063
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.8...v10.0.9
## 10.0.8
* feat: add callback to handle performAction by @huandu in https://github.com/singerdmx/flutter-quill/pull/2061
* fix: Invalid selection when tapping placeholder text by @huandu in https://github.com/singerdmx/flutter-quill/pull/2062
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.7...v10.0.8
## 10.0.7
* Fix: RTL issues by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2060
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.6...v10.0.7
## 10.0.6
* fix: textInputAction is not set when creating QuillRawEditorConfiguration by @huandu in https://github.com/singerdmx/flutter-quill/pull/2057

@ -1,6 +1,6 @@
name: flutter_quill_extensions
description: Embed extensions for flutter_quill including image, video, formula and etc.
version: 10.0.6
version: 10.0.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/

@ -4,6 +4,28 @@
All notable changes to this project will be documented in this file.
## 10.0.9
* Fix: manual checking of directionality by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2063
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.8...v10.0.9
## 10.0.8
* feat: add callback to handle performAction by @huandu in https://github.com/singerdmx/flutter-quill/pull/2061
* fix: Invalid selection when tapping placeholder text by @huandu in https://github.com/singerdmx/flutter-quill/pull/2062
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.7...v10.0.8
## 10.0.7
* Fix: RTL issues by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2060
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.0.6...v10.0.7
## 10.0.6
* fix: textInputAction is not set when creating QuillRawEditorConfiguration by @huandu in https://github.com/singerdmx/flutter-quill/pull/2057

@ -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: 10.0.6
version: 10.0.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/

@ -81,6 +81,7 @@ class QuillEditorConfigurations extends Equatable {
this.onScribbleActivated,
this.scribbleAreaInsets,
this.readOnlyMouseCursor = SystemMouseCursors.text,
this.onPerformAction,
});
final QuillSharedConfigurations sharedConfigurations;
@ -374,6 +375,9 @@ class QuillEditorConfigurations extends Equatable {
/// Optional insets for the scribble area.
final EdgeInsets? scribbleAreaInsets;
/// Called when a text input action is performed.
final void Function(TextInputAction action)? onPerformAction;
@override
List<Object?> get props => [
placeholder,
@ -437,6 +441,7 @@ class QuillEditorConfigurations extends Equatable {
bool? enableScribble,
void Function()? onScribbleActivated,
EdgeInsets? scribbleAreaInsets,
void Function(TextInputAction action)? onPerformAction,
}) {
return QuillEditorConfigurations(
sharedConfigurations: sharedConfigurations ?? this.sharedConfigurations,
@ -503,6 +508,7 @@ class QuillEditorConfigurations extends Equatable {
enableScribble: enableScribble ?? this.enableScribble,
onScribbleActivated: onScribbleActivated ?? this.onScribbleActivated,
scribbleAreaInsets: scribbleAreaInsets ?? this.scribbleAreaInsets,
onPerformAction: onPerformAction ?? this.onPerformAction,
);
}
}

@ -10,6 +10,7 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import '../common/utils/platform.dart';
import '../document/attribute.dart';
import '../document/document.dart';
import '../document/nodes/container.dart' as container_node;
import '../document/nodes/leaf.dart';
@ -300,6 +301,7 @@ class QuillEditorState extends State<QuillEditor>
readOnlyMouseCursor: configurations.readOnlyMouseCursor,
magnifierConfiguration: configurations.magnifierConfiguration,
textInputAction: configurations.textInputAction,
onPerformAction: configurations.onPerformAction,
),
),
),
@ -984,6 +986,13 @@ class RenderEditor extends RenderEditableContainerBox
start: localWord.start + nodeOffset,
end: localWord.end + nodeOffset,
);
// Don't change selection if the selected word is a placeholder.
if (child.container.style.attributes
.containsKey(Attribute.placeholder.key)) {
return;
}
if (position.offset - word.start <= 1 && word.end != position.offset) {
_handleSelectionChange(
TextSelection.collapsed(offset: word.start),

@ -89,6 +89,7 @@ class QuillRawEditorConfigurations extends Equatable {
this.scribbleAreaInsets,
this.readOnlyMouseCursor = SystemMouseCursors.text,
this.magnifierConfiguration,
this.onPerformAction,
});
/// Controls the document being edited.
@ -341,6 +342,9 @@ class QuillRawEditorConfigurations extends Equatable {
final TextMagnifierConfiguration? magnifierConfiguration;
/// Called when a text input action is performed.
final void Function(TextInputAction action)? onPerformAction;
@override
List<Object?> get props => [
readOnly,

@ -975,16 +975,24 @@ class QuillRawEditorState extends EditorState
}
prevNodeOl = attrs[Attribute.list.key] == Attribute.ol;
var nodeTextDirection = getDirectionOfNode(node);
// verify if the direction from nodeTextDirection is the default direction
// and watch if the system language is a RTL language and avoid putting
// to the edge of the left side any checkbox or list point/number if is a
// RTL language
if (nodeTextDirection == TextDirection.ltr &&
_textDirection == TextDirection.rtl) {
nodeTextDirection = TextDirection.rtl;
}
if (node is Line) {
final editableTextLine = _getEditableTextLineFromNode(node, context);
result.add(Directionality(
textDirection: getDirectionOfNode(node), child: editableTextLine));
textDirection: nodeTextDirection, child: editableTextLine));
} else if (node is Block) {
final editableTextBlock = EditableTextBlock(
block: node,
controller: controller,
textDirection: getDirectionOfNode(node),
textDirection: nodeTextDirection,
scrollBottomInset: widget.configurations.scrollBottomInset,
horizontalSpacing: _getHorizontalSpacingForBlock(node, _styles),
verticalSpacing: _getVerticalSpacingForBlock(node, _styles),
@ -1011,7 +1019,7 @@ class QuillRawEditorState extends EditorState
);
result.add(
Directionality(
textDirection: getDirectionOfNode(node),
textDirection: nodeTextDirection,
child: editableTextBlock,
),
);

@ -212,7 +212,7 @@ mixin RawEditorStateTextInputClientMixin on EditorState
@override
void performAction(TextInputAction action) {
// no-op
widget.configurations.onPerformAction?.call(action);
}
@override

@ -134,6 +134,15 @@ class EditableTextBlock extends StatelessWidget {
Block node, DefaultStyles? defaultStyles) {
final attrs = block.style.attributes;
if (attrs.containsKey(Attribute.blockQuote.key)) {
// Verify if the direction is RTL and avoid passing the decoration
// to the left when need to be on right side
if (textDirection == TextDirection.rtl) {
return defaultStyles!.quote!.decoration?.copyWith(
border: Border(
right: BorderSide(width: 4, color: Colors.grey.shade300),
),
);
}
return defaultStyles!.quote!.decoration;
}
if (attrs.containsKey(Attribute.codeBlock.key)) {
@ -184,7 +193,15 @@ class EditableTextBlock extends StatelessWidget {
MediaQuery.devicePixelRatioOf(context),
cursorCont,
);
final nodeTextDirection = getDirectionOfNode(line);
var nodeTextDirection = getDirectionOfNode(line);
// verify if the direction from nodeTextDirection is the default direction
// and watch if the system language is a RTL language and avoid putting
// to the edge of the left side any checkbox or list point/number if is a
// RTL language
if (nodeTextDirection == TextDirection.ltr &&
textDirection == TextDirection.rtl) {
nodeTextDirection = TextDirection.rtl;
}
children.add(
Directionality(
textDirection: nodeTextDirection,

@ -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: 10.0.6
version: 10.0.9
homepage: https://1o24bbs.com/c/bulletjournal/108/
repository: https://github.com/singerdmx/flutter-quill/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

Loading…
Cancel
Save