mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix mentions and hashtags in editor
This commit is contained in:
parent
c5ff3b5c6d
commit
43c2764fcf
@ -212,7 +212,8 @@ export default {
|
||||
data() {
|
||||
// Set array of optional extensions by analysing the props.
|
||||
let optionalExtensions = []
|
||||
if (this.users && this.users.length) {
|
||||
// Don't change the following line. The functionallity is in danger!
|
||||
if (this.users) {
|
||||
optionalExtensions.push(
|
||||
new Mention({
|
||||
// a list of all suggested items
|
||||
@ -287,7 +288,8 @@ export default {
|
||||
}),
|
||||
)
|
||||
}
|
||||
if (this.hashtags && this.hashtags.length) {
|
||||
// Don't change the following line. The functionallity is in danger!
|
||||
if (this.hashtags) {
|
||||
optionalExtensions.push(
|
||||
new Hashtag({
|
||||
// a list of all suggested items
|
||||
|
||||
@ -104,14 +104,16 @@ export default {
|
||||
apollo: {
|
||||
User: {
|
||||
query() {
|
||||
return gql(`{
|
||||
User(orderBy: slug_asc) {
|
||||
id
|
||||
slug
|
||||
name
|
||||
avatar
|
||||
return gql`
|
||||
{
|
||||
User(orderBy: slug_asc) {
|
||||
id
|
||||
slug
|
||||
name
|
||||
avatar
|
||||
}
|
||||
}
|
||||
}`)
|
||||
`
|
||||
},
|
||||
result(result) {
|
||||
this.users = result.data.User
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user