Skip to content

Commit

Permalink
Allow disabling the upload of images taken from the device - edited e…
Browse files Browse the repository at this point in the history
…rror message
  • Loading branch information
TheCarpetMerchant committed Jan 28, 2023
1 parent 4325336 commit 45f407a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/widgets/toolbar_widget.dart
Expand Up @@ -2038,8 +2038,10 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
if (filename.text.isEmpty &&
url.text.isEmpty) {
setState(() {
validateFailed =
'Please either choose an image or enter an image URL!';
validateFailed = widget.htmlToolbarOptions
.allowImagePicking
? 'Please either choose an image or enter an image URL!'
: 'Please enter an image URL!';
});
} else if (filename.text.isNotEmpty &&
url.text.isNotEmpty) {
Expand Down

0 comments on commit 45f407a

Please sign in to comment.