Update gal, fix bug #1627

pull/1682/head
Ellet 1 year ago
parent 5df2f0758d
commit fb2c39e463
  1. 6
      flutter_quill_extensions/pubspec.yaml
  2. 5
      lib/src/widgets/raw_editor/raw_editor_state.dart
  3. 3
      pubspec.yaml

@ -35,15 +35,15 @@ dependencies:
universal_html: ^2.2.4
cross_file: ^0.3.3+6
flutter_quill: ^9.0.0-dev
flutter_quill: ^9.2.1
photo_view: ^0.14.0
# Plugins
video_player: ^2.8.1
youtube_player_flutter: ^9.0.0-beta.0
url_launcher: ^6.2.1
super_clipboard: ^0.8.1
gal: ^2.1.3
super_clipboard: ^0.8.2+1
gal: ^2.2.0
gal_linux: ^0.0.1
image_picker: ^1.0.4

@ -19,6 +19,7 @@ import 'package:flutter/services.dart'
TextInputControl;
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'
show KeyboardVisibilityController;
import 'package:html/parser.dart' as html_parser;
import 'package:super_clipboard/super_clipboard.dart';
import '../../../quill_delta.dart';
@ -217,7 +218,9 @@ class QuillRawEditorState extends EditorState
if (html == null) {
return;
}
final deltaFromClipboard = Document.fromHtml(html);
final htmlBody = html_parser.parse(html).body?.outerHtml;
final deltaFromClipboard = Document.fromHtml(htmlBody ?? html);
var newDelta = Delta();
newDelta = newDelta.compose(deltaFromClipboard);
if (!controller.document.isEmpty()) {

@ -49,6 +49,7 @@ dependencies:
quiver: ^3.2.1
equatable: ^2.0.5
meta: ^1.9.1
html: ^0.15.4
flutter_colorpicker: ^1.0.3
@ -61,7 +62,7 @@ dependencies:
url_launcher: ^6.1.14
flutter_keyboard_visibility: ^6.0.0
device_info_plus: ^9.1.0
super_clipboard: ^0.8.1
super_clipboard: ^0.8.2+1
dev_dependencies:
flutter_lints: ^3.0.1

Loading…
Cancel
Save