Skip to content

Showing "loading" message #77

@grtjn

Description

@grtjn

I am using hljs-include to pull in code from back-end, which takes half a second. Enough for end-users to notice. I also noticed that hljs initially shows the contents of the directive before replacing it with the result from the include. So I added a "loading.." message in there. Next thought was to add a spinner, something like:

<hljs hljs-include="uri">loading.. <i class="fa fa-spinner fa-spin"></i></hljs>

Unfortunately, the i tag gets escaped, and shown as is. If I add hljs-no-escape, it gets stripped away. Would be fun if I could show a loading message with a spinner somehow. Is that possible with current hljs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions