-
Notifications
You must be signed in to change notification settings - Fork 457
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
Emoji picker #259
Emoji picker #259
Conversation
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.
Remember to update the readme with the new feature 😄
src/utils/contentEditable.ts
Outdated
end: start + range.toString().length | ||
} | ||
} | ||
export const isFirefox = () => navigator.userAgent.search("Firefox") > 0; |
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.
export const isFirefox = () => navigator.userAgent.search("Firefox") > 0; | |
export const isFirefox = () => navigator.userAgent.search("Firefox") > 0; |
} | ||
|
||
return ( | ||
<div className="rcw-sender"> | ||
<div ref={refContainer} className="rcw-sender"> | ||
<button className='rcw-picker-btn' type="submit" onClick={handlerPressEmoji}> |
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.
I think we should add a conditional to hide the emoji picker setting it to true by default. What do you think?
el.innerHTML = '' | ||
setEnter(false) |
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.
el.innerHTML = '' | |
setEnter(false) | |
el.innerHTML = ''; | |
setEnter(false); |
setEnter(false) | ||
} | ||
else if(brRegex.test(el.innerHTML)){ | ||
el.innerHTML = el.innerHTML.replace(brRegex, '') |
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.
el.innerHTML = el.innerHTML.replace(brRegex, '') | |
el.innerHTML = el.innerHTML.replace(brRegex, ''); |
el.innerHTML = el.innerHTML.replace(brRegex, '') | ||
} | ||
} | ||
checkSize() |
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.
checkSize() | |
checkSize(); |
> p { | ||
white-space: pre-wrap; | ||
} |
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.
Is it ok to delete this? Won't be a problem when using markdown?
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.
Yes its ok, this style I added in before PR.
src/utils/contentEditable.ts
Outdated
const position = getCaretIndex(el) | ||
let characterToEnter = '\n\n'; | ||
let prevChar, char = ''; | ||
if (position > 0) { // Change this |
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.
Change this?
Hi, awesome job with react-chat-widget. Is a question about emoji feature, can we set their properties like is designed on emoji-mart git page? If yes, how can i do that? Would be nice to set i18n propertie to do some translation on it. Thanks note: maybe i should have posted this in the questions tab, sorry |
Summary
Screenshots
Chrome
Firefox
Safari