Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

displayText that is treated as html not as text #329

Closed
gae123 opened this issue Jan 6, 2015 · 12 comments
Closed

displayText that is treated as html not as text #329

gae123 opened this issue Jan 6, 2015 · 12 comments

Comments

@gae123
Copy link

gae123 commented Jan 6, 2015

Currently the displayText is treated as text both in autocomplete and input-Tag. I would like to have it treated as simple html. This way one could color part of a tag, add Font Awesome characters etc. I guess this is a simplified version of request #257 but I think it is much easier to achieve, in fact I have a small patch that works.

@mbenford
Copy link
Owner

Yeah, that's easier to implement than #257, but I think of it as a kind of an advanced feature. I mean, I assume most people have a consistent model containing just data, not mixed with presentation rules.

I'll add this to the backlog so I can assess its viability later.

@gae123
Copy link
Author

gae123 commented Jan 15, 2015

Well, I wanted to do something as simple as what you see in the attached image, this required html to change the font. I have a small patch that works for me but I would need to add options for html vs. no html to keep it backwards compatible.

image

@stijnbe
Copy link

stijnbe commented Mar 9, 2015

@gae123 are you able to post the patch here in this thread or even better, create a pull request?

@gae123
Copy link
Author

gae123 commented Mar 9, 2015

I guess I could but it is kind of a hack. It will only works if your items are not in HTML themselves. This is my case, so it works well but is not a general solution.

On Mar 9, 2015, at 9:12 AM, Stijn Beauprez [email protected] wrote:

@gae123 https://github.com/gae123 are you able to post the patch here in this thread or even better, create a pull request?


Reply to this email directly or view it on GitHub #329 (comment).

PK
[email protected]

@mbenford
Copy link
Owner

Custom template support for the autocomplete directive is already implemented in master. It'll be part of v2.3.0.

@gae123
Copy link
Author

gae123 commented Mar 20, 2015

This will be so awesome. Thanks

On Mar 19, 2015, at 4:53 PM, Michael Benford [email protected] wrote:

Custom template support for the autocomplete directive is already implemented in master. It'll be part of v2.3.0.


Reply to this email directly or view it on GitHub #329 (comment).

PK
[email protected]

@mbenford
Copy link
Owner

So, I went the extra mile and implemented custom template support for tags as well. Here's an animated gif of custom templates for tags and autocomplete:

Imgur

@gae123
Copy link
Author

gae123 commented Mar 21, 2015

Awesome!!!

On Mar 20, 2015, at 7:38 PM, Michael Benford [email protected] wrote:

So, I went the extra mile and implemented 45e5d99 custom template support for tags as well. Here's an animated gif of custom templates for tags and autocomplete:

https://camo.githubusercontent.com/bf48cdfac0bb11eaca884a4b9812c752e492e918/687474703a2f2f692e696d6775722e636f6d2f597956765675662e676966

Reply to this email directly or view it on GitHub #329 (comment).

PK
[email protected]

@mbenford
Copy link
Owner

v2.3.0 is already published on all distribution channels and it allows changing both tag and autocomplete templates. I'm working on the docs to explain how to create custom templates.

Can this issue be closed?

@gae123
Copy link
Author

gae123 commented Mar 25, 2015

I do think so but please let me download 2.3.0 and try it before I close it. Do you have an example in the test cases or somewhere else?

@mbenford
Copy link
Owner

You can take a look at the autocomplete specs. Hopefully you'll get how everything works. :)

@gae123
Copy link
Author

gae123 commented Mar 25, 2015

Looks good, I just switched to 2.3.0. I figured things out from the source code but some examples in the Demo section would be very welcome.

@gae123 gae123 closed this as completed Mar 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants