forked from Nexus/nexus
insert unicode emojis as text not tags
This commit is contained in:
parent
f8938b8257
commit
65890b8e00
1 changed files with 30 additions and 8 deletions
|
|
@ -834,6 +834,21 @@ class const Composer(
|
|||
controller.addTag(id: id, name: name);
|
||||
node?.requestFocus();
|
||||
},
|
||||
insertText: (text) {
|
||||
final end =
|
||||
controller.selection.baseOffset;
|
||||
controller
|
||||
..dismissOverlay()
|
||||
..value = controller.value.replaced(
|
||||
.new(
|
||||
start:
|
||||
end - query.value.length - 1,
|
||||
end: end,
|
||||
),
|
||||
"$text ",
|
||||
);
|
||||
node?.requestFocus();
|
||||
},
|
||||
),
|
||||
controller: controller,
|
||||
onSearch: (newQuery, newTriggerCharacter) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue