Open AnkitGabani opened 5 years ago
There may be other information on the attribute that you're not setting, I'm not entirely familiar. We'll look into this.
I am facing the same issue. Can anyone help me out to fix it. // hashtags is array of dictionary having details of mentions @time of creation for item in hashtags{ let tempDic = item as? NSDictionary ?? [:] let location = Int(tempDic["Tag_Position"] as? String ?? "0") ?? 0 let length = Int(tempDic["Tag_Length"] as? String ?? "") ?? 0 let tagName = tempDic["Keyword_Tags"] as? String ?? "" let tagID = tempDic["Tag_ID"] as? String ?? "" let mentionAttrib = HKWMentionsAttribute() mentionAttrib.mentionText = tagName mentionAttrib.entityIdentifier = tagID mentionAttrib.metadata = ["id": tagID, "type": 1, "length": length] mentionAttrib.range = NSMakeRange(location, length) plugin?.addMention(mentionAttrib) }
Does anyone have update on this?
Hi @cyuan1124 Any update on this? This is crucial.
Hi @cyuan1124 Any update on this? This is crucial.
Hi @perrygarg , I am not an owner of Hakawaii. The last commit I submitted was for a feature required by my team. You can reach out to @bkoatz for help.
Hello Dear, Mentions works nice in the Create mode.
Now on Edit screen. I am preloading textView with text that contains mentions. But Hakawai textView does not highlight those mentions which are set programatically as textView.text = "Hi XYZMention".
If I add new mention it highlights the new mention, when I call plugin.mentions() method it only returns the mentions that are newly created (typed by user) not the one that were already present in the text when textview is initialized.
I have also tried creating HKWMentionsAttribute for mentions that previously there in text and added it to plugin but still not working.
Here is my code
if let mentions = objPost?.mentions { for mention in mentions { let mentionAttrib = HKWMentionsAttribute() mentionAttrib.entityIdentifier = String(mention.id!)
Please provide solution