You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand highlighting functionality to wrapping tag/templates.
It would be nice to extract this code in an external plugin.
Why?
I need not to highlight, but to wrap the word found with a link (for example).
It's almost the same as the backlight, just wrapping tag differently. Another replacement pattern.
return'<span style="background: #'+highlightColor+';">'+match+'</span>';
return '<a href="/another-page">' + match + '</a>';
highlighting like linking specifically applied - additional functionality, not related to finding bad words. It complements the library well. But there must be the possibility of independent expansion.
Expand highlighting functionality to wrapping tag/templates.
It would be nice to extract this code in an external plugin.
Why?
I need not to highlight, but to wrap the word found with a link (for example).
It's almost the same as the backlight, just wrapping tag differently. Another replacement pattern.
return '<a href="/another-page">' + match + '</a>';
highlighting like linking specifically applied - additional functionality, not related to finding bad words. It complements the library well. But there must be the possibility of independent expansion.
As I see it
The text was updated successfully, but these errors were encountered: