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

Add a way to put attributes to formatting #472

Closed
jcubic opened this issue Mar 9, 2019 · 1 comment
Closed

Add a way to put attributes to formatting #472

jcubic opened this issue Mar 9, 2019 · 1 comment
Labels
feature resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Mar 9, 2019

I have idea for a new feature for jQuery Terminal

The idea is to put JSON into formatting so you can have tittle attribute on normal span or link.

Will be able to integrate it with terminal chat to show date when message was posted, when you hover over username.

@jcubic jcubic added the feature label Mar 9, 2019
jcubic added a commit that referenced this issue Apr 5, 2019
@jcubic
Copy link
Owner Author

jcubic commented Apr 5, 2019

New features description:

  • it get html attributes from JSON
  • it add them if they are on the list of allowed attributes (security option for untrusted echo)
  • bare $.terminal.format don't allow attributes (they are ignored)
  • default terminal option is array: ['title', /^aria-/, 'id', /^data-/]
  • default terminal option is passed to echo function if not overwriten by calling echo

@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Apr 5, 2019
@jcubic jcubic closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant