Skip to content

shahnshahmalik/js-tag-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Tag Editor

Demo Link

Click to see demo 💻 Edit on StackBlitz ⚡️

Import the lib

import { TagEditor } from "simple-tag-editor";

Import the Style

import "simple-tag-editor/index.css";

Add a reference to the input

const inputEl = document.getElementById('inputEL');

Add a custom html for the close btn

const el = '<i class="fa fa-times"></i>';

Initialize

const tagEdit = new TagEditor('tagEdit', inputEl, el);

if(inputEl) { inputEl.addEventListener('keyup', event => { if (event.keyCode === 13) { tagEdit.addTag(inputEl.value); inputEl.value = ''; } }); }

😎 Thanks and PR's are always welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published