Drop all formatting by default in InputField.
This commit is contained in:
parent
efb7dc927a
commit
37531086ec
1 changed files with 6 additions and 1 deletions
|
|
@ -129,6 +129,11 @@ bool IsNewline(QChar ch) {
|
||||||
.arg(++GlobalCustomEmojiCounter);
|
.arg(++GlobalCustomEmojiCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] QString DefaultTagMimeProcessor(QStringView mimeTag) {
|
||||||
|
// By default drop formatting in InputField-s.
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
[[nodiscard]] uint64 CustomEmojiIdFromLink(QStringView link) {
|
[[nodiscard]] uint64 CustomEmojiIdFromLink(QStringView link) {
|
||||||
const auto skip = Ui::InputField::kCustomEmojiTagStart.size();
|
const auto skip = Ui::InputField::kCustomEmojiTagStart.size();
|
||||||
const auto index = link.indexOf('?', skip + 1);
|
const auto index = link.indexOf('?', skip + 1);
|
||||||
|
|
@ -2036,7 +2041,7 @@ void InputField::processFormatting(int insertPosition, int insertEnd) {
|
||||||
|
|
||||||
// Apply inserted tags.
|
// Apply inserted tags.
|
||||||
const auto insertedTagsProcessor = _insertedTagsAreFromMime
|
const auto insertedTagsProcessor = _insertedTagsAreFromMime
|
||||||
? _tagMimeProcessor
|
? (_tagMimeProcessor ? _tagMimeProcessor : DefaultTagMimeProcessor)
|
||||||
: nullptr;
|
: nullptr;
|
||||||
const auto breakTagOnNotLetterTill = ProcessInsertedTags(
|
const auto breakTagOnNotLetterTill = ProcessInsertedTags(
|
||||||
_st,
|
_st,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue