From f2ef95629363d9853a36829c24673d6d6a92d5da Mon Sep 17 00:00:00 2001 From: CatHood0 Date: Sun, 18 Aug 2024 06:59:23 -0400 Subject: [PATCH] Fix: spellcheck highlight text into code-block and when readOnly is true --- lib/src/editor/widgets/text/text_line.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/editor/widgets/text/text_line.dart b/lib/src/editor/widgets/text/text_line.dart index bf3a0ab8..9251c88d 100644 --- a/lib/src/editor/widgets/text/text_line.dart +++ b/lib/src/editor/widgets/text/text_line.dart @@ -405,7 +405,8 @@ class _TextLineState extends State { } // verify is node is not link because we never need check a link word - if (!isLink) { + // and avoid to show highlighting when is only reading + if (!isLink && !widget.readOnly && !widget.line.style.attributes.containsKey('code-block')) { final service = SpellcheckerServiceProvider.instance; final spellcheckedSpans = service.fetchSpellchecker(textNode.value); if (spellcheckedSpans != null && spellcheckedSpans.isNotEmpty) {