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
Allow preventing link insertion in RichContentEditable #3890
Allow preventing link insertion in RichContentEditable #3890
Conversation
this.updateValue(this.$refs.contenteditable.innerHTML) | ||
const eventData = { | ||
link, | ||
run: true, |
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.
run: true, | |
insertText: true, |
Might make it a bit clearer what this is about.
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.
👍
102e4db
to
4fe5085
Compare
4fe5085
to
84d339d
Compare
84d339d
to
8e0783d
Compare
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.
Haven't tested but code looks good
…pper context prevent text insertion Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
8e0783d
to
e4319d3
Compare
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.
Works, tested against Talk
Note for self:
<NcRichContenteditable @smart-picker-submit="handleSmartPickerSubmit" />
handleSmartPickerSubmit(event) {
console.log(event)
event.insertText = false
},
When getting a picker result, emit an event so parent components can prevent it to be inserted in the content and add some custom processing.
This could be useful in Talk when getting an OpenStreetMap link. A location rich object could be shared instead of inserting the link.