-
Notifications
You must be signed in to change notification settings - Fork 48
Make it easier to customize #2
Comments
This directive is riddled with bugs, but has a nice API : https://github.com/aurbano/smart-area |
I don't like the api. Hard coded to Twitter and you have big configuration objects as a property, something I have been think about moving away from |
Your module is really easy to understand and use.. until the moment I want to some processing with the "selected mentions" in my outer controller / directive... hmm . So far all I got is the resulting text , something like hello , @[steve rodriguez:hi] , @[kyle corn:123] , @[megan burgerpants:ab-] hurray ! Let me see if I can do something. Thanks for the cool module |
@phuyem the $mention object contains any additional data you might need, including meta data. I think we could iterate on whether the model should contain a human-readable string, a tagged string, or an object with everything all tied together, but I feel like the raw being the model and all other stuff treated as meta-data (available through $mention) works well enough. |
Actually, I did modify your code for our PRODUCTION to something similar to the way ui-tinymce boostrap :
and from MY controller:
So this way, I can interact with your ui-mention directly from my controller (where many things are workign together there) without creating a new directive |
@amcdnl smart-area rocks! 10 times better than this crap. |
Right now, I just exposed everything via the directive controller. Although this gives you a LOT of control, it requires you to make your own secondary directive. For now, I actually think this isn't the most terrible thing in the world (because you have a LOT of control over how you want your template to get generated, have no obfuscation around the
<textarea>
, can customize almost any and all behavior, etc).That said, I'd be curious to explore an automatic way of translating element attributes into controller property overrides. So
<textarea ui-mention find-choices="doSomething">
automatically gets mapped onto the controller instead of the default one. This may involve usingbindToController
however I was struggling with trying to get it to work and had no real success.The text was updated successfully, but these errors were encountered: