Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom template with highlight #124

Open
jjjjjjwork opened this issue Nov 12, 2015 · 5 comments
Open

Custom template with highlight #124

jjjjjjwork opened this issue Nov 12, 2015 · 5 comments
Assignees
Labels

Comments

@jjjjjjwork
Copy link

Hi,

Please, is it possible to combine custom template with highlight?

Thanks

@pawelczak
Copy link
Owner

Hi,
Custom templates should work with highlighthing.

@jjjjjjwork
Copy link
Author

Hi,
Not work actually for me, if you can check the code i’m using:

template: {
        type: "custom",
        method: function(value, item) {
            return "<span class='s-1'>" + item.civilite + "</span> <span class='s-2'>" + item.prenom + " " + item.nom + "</span> <span class='s-3'>" + item.fonction + "</span> <span class='s-4'>" + item.departement + ' (' + item.coderegion + ')</span>';
        }
    }

Thanks!

@pawelczak
Copy link
Owner

It turned out, that you are missing value in template method. I've prepared demo example with your template code. It's located in demo/example_custom_template.html. I hope that this will solve your issue.

@jjjjjjwork
Copy link
Author

Thanks!

Is there a possibility to highlights all the items, not only one?

@pawelczak
Copy link
Owner

At the moment you cannot higlight many template values at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants