Code Monkey home page Code Monkey logo

szmentions's People

Contributors

readmecritic avatar szweier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

darkcl

szmentions's Issues

not found

import <SZMentions/SZMentionsListener.h>

/Users/me/Downloads/SZMentions-master/SZMentionsExample/SZMentionsExample/Classes/SZExampleMention.h:9:9: 'SZMentions/SZMentionsListener.h' file not found

can you give me a suggestion?

thanks

julian

Bug in iOS 11

The swift version here is okey but this is wrong in iOS 11. Plz help me check this again. Plz refer image bellow:
screen shot 2017-09-27 at 11 36 55

According I'm trying to pod swift version to my Objective-C project but cannot run

How to remove mention in one stroke while typing backspace

Hi @szweier , Awesome library you have made. I have integrated it in my code. Working fine. But just one feature I want, that is to remove mention in just one stroke while backspacing. I just tried the following code,

if let mention = mentions |> mentionBeingEdited(at: range) {
mention |> clearMention()
/* let str = mentionsTextView.attributedText.string
let replaceStr = NSAttributedString(string:str.replacingOccurrences(of: mention.object.display, with: ""))
print("NAME ",mention.object.display)
print("RANGE ",range)
let str = mentionsTextView.attributedText.string
let replacedNameString = str.replacingOccurrences(of: mention.object.display, with: "")O
print("NAME AFTER REPLACE ",replacedNameString)
let (text, selectedRange) = mentionsTextView.attributedText
|> replace(charactersIn: NSRange(str.startIndex..., in: str), with: replacedNameString)
print("TEXT ",text.string)
print("selectedRange ",selectedRange)*/
// mentionsTextView.selectedRange = NSRange(mention.object.display.startIndex..., in: mention.object.display)
self.mentionsTextView.text = self.mentionsTextView.text.replacingOccurrences(of: mention.object.display, with: "")
print("self.mentionsTextView.text ",self.mentionsTextView.text)
print("mentionsTextView.attributedText ",mentionsTextView.attributedText)
print("RANGE ",NSRange(self.mentionsTextView.text.startIndex..., in: self.mentionsTextView.text))
print(mentions.count)
let (text, selectedRange) = mentionsTextView.attributedText
|> replace(charactersIn: NSRange(self.mentionsTextView.text.startIndex..., in: self.mentionsTextView.text), with: self.mentionsTextView.text)
/let (text, selectedRange) = mentionsTextView.attributedText
|> replace(charactersIn: range, with: text)
/
mentionsTextView.attributedText = text
mentionsTextView.selectedRange = selectedRange
shouldChangeText = false

above code is working fine, when we tried to remove mention from last. But if we tried to remove it from the middle then app crashed.

Example. Suppose I have a note like this,
test @abc and @pqr
1] Now if I start to remove mention @pqr first, then it will remove in one stroke
2] But when I start to remove mention @abc first, then app crashes. Please help if anyone is having the solution for this

[Question] Is there anything implemented to "read back" mentions from TextView?

Let's say I'm using your example and I type something like "A test with @Steven Zweier library"

When reading back the textView.text, it would read back as "A test with Steven Zweier library".

Is there anything implemented to return this String informing what was a mention and what is "plain text", for example, to be able to set differently in Labels later, identifying the mention? Or is this something that should be implemented at a high level?

If so, do you recommend anything specific to be able to identify this?

Swift Version

My project is using Swift but I harder to implement to my project. Possible do an example in swift?

How to cancel search?

Is there a way to cancel searching and not resign the textView's firstResponder? I want to allow users to cancel searching by tapping a button or the textView.

My mentions listener has spaceAfterMention, addMentionOnReturnKey, and searchSpaces all set to true.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.