Calling all Guinea Pigs: Dynamic Hashtags

@sailorcihan @deleteduser @ohsalmanfarizy

I’ve created a small utility to display tags/hashtags in a single text element .
It’s:

  1. Easy to use

  2. Stylable

  3. Clickable

  4. Hrefable

  5. Fully accessible

  6. Minimally tested

No text-wrapping in this Alpha version so please keep your tags on one line.

Feel free to post any issues here or on [Github]( Feel free to post any issues here or on Github. GitHub - big-skim-milk/sk-hashtagger: A tiny utility to turn single wix text elements into functional hashtags. ) .

**I have a sneaking suspicion that the click action might have issues with Safari since Safari is essentially a dumpster fire with a fancy dbrand skin, but I can’t bring myself to use it because I value my dignity so please let me know.

2 Likes

Typical example call:

import { tagger } from 'public/sk-tagger.js';

tagger(['text7'], {
	tags: $w('#dynamicDataset').getCurrentItem().tags,
	font_size: 18,
	ratio: 1.6,
	symbol: false,
	delimiter: ', ',
	whitespace: 2,
	format_all: `color:#fff;`,
	format_tag: `background-color:#000;
		padding-top:3px;
		padding-bottom:3px;
		padding-right:6px;
		padding-left:6px;
		border-radius:3px;`,
	href: ['https://duck.com', 'https://startpage.com', 'https://quant.com'],
	target: '_blank',
}, tag => console.log(tag));
});

v0.2 updates
.tags property now accepts strings and arrays.
.href property now accepts strings and arrays.
Split .formatting property into .format_all and .format_tag for more granular control of styling
.delimiter property now has default: ', ’

@skmedia


I just tried the code but I forgot something, can you tell me, where is my mistake?