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

Allow CKEDITOR.template to use a callback as a source of a template #2821

Closed
mlewand opened this issue Feb 18, 2019 · 1 comment
Closed

Allow CKEDITOR.template to use a callback as a source of a template #2821

mlewand opened this issue Feb 18, 2019 · 1 comment
Labels
changelog:api A changelog entry should be put in the API section of the changelog. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented Feb 18, 2019

Type of report

Feature request

Provide description of the new feature

Based on PR #2799 request:

The main reason is I want to use it in configuration of 'mentions' plugin
Some of the users I want to mention does not have avatars, in this case I want to display their initials instead of unreachable image.

var config = {
mentions: [
    {
        feed: dataFeed,
        marker: '@',
        itemTemplate: function(data) {
            return '<li data-id="{id}" class="autocomplete-item">' +
                    (data.imageUrl ? '<img class="avatar" src="{imageUrl}"/>' : '<span class="initials">{initials}</span>') +
                    '<span>{label}</span>' +
                '</li>'
        },
        outputTemplate: '[[{type}|{id}|{label}]]<span>&nbsp;</span>',
        minChars: 1
    }
]
}
@mlewand mlewand added type:feature A feature request. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. target:major Any docs related issue that should be merged into a major branch. status:confirmed An issue confirmed by the development team. labels Feb 18, 2019
@mlewand mlewand added the changelog:api A changelog entry should be put in the API section of the changelog. label Feb 18, 2019
@mlewand
Copy link
Contributor Author

mlewand commented Feb 18, 2019

Closed with #2822.

@mlewand mlewand closed this as completed Feb 18, 2019
@mlewand mlewand added this to the 4.12.0 milestone Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:api A changelog entry should be put in the API section of the changelog. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Projects
None yet
Development

No branches or pull requests

1 participant