-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a means of using a multi-character trigger. #230
base: master
Are you sure you want to change the base?
Conversation
src/TributeRange.js
Outdated
@@ -144,7 +144,7 @@ class TributeRange { | |||
: '\xA0' | |||
text += textSuffix | |||
this.pasteHtml(text, info.mentionPosition, | |||
info.mentionPosition + info.mentionText.length + !this.tribute.autocompleteMode) | |||
info.mentionPosition + info.mentionText.length + info.mentionTriggerChar.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this break autocompleteMode in tributejs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I think the idea of having a boolean be used as an integer for arithmetic purposes made me blitz it, but I didn't put back a proper solution.
It likely needs a
autocompleteOffet = this.tribute.autocompleteMode ? info.mentionTriggerChar.length : 0;
and then use that offset value.
Hi, |
I've fallen a bit behind keeping this branch up to date with master so if
someone wants to check it out, fix the conflicts and apply any other needed
changes, that would be really appreciated.
I have no idea how to encourage the maintainers to take a close look at
this PR though.
…On Fri, Oct 4, 2019 at 10:10 AM Peter Schuster ***@***.***> wrote:
Hi,
I am also interested in this feature. Any chance of getting this PR
merged? Or is there anything I can help with? I also think that the length
of the trigger string needs to be added to line 135 of TributeRange.js
with offset -1.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#230?email_source=notifications&email_token=AAF4L2FQDA4LVBTJB57LQYLQMZNVHA5CNFSM4HEPNL4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAJTOII#issuecomment-538130209>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAF4L2CR2LNBIF6SIMI4CMTQMZNVHANCNFSM4HEPNL4A>
.
|
This PR is more for visibility purposes because my dev setup is not agreeing with gulp; I haven't run any formal tests. I'm hoping someone can take what I'm hinting at here and is able to provide a more robust solution. It's working for my particular use case after modifying the non ES6 javascript file.
This relates to issue #153