Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
66 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,40 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title>Tagger Example</title> | ||
<link href="tagger.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<h1>Tagger Example</h1> | ||
<input type="text" value="charles,louis,michel" name="tags" /> | ||
<script src="tagger.js"></script> | ||
<script> | ||
var t = tagger(document.querySelector('[name="tags"]'), { | ||
allow_duplicates: false, | ||
allow_spaces: true | ||
}); | ||
</script> | ||
</body> | ||
</html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title>Tagger Example</title> | ||
<link href="tagger.css" rel="stylesheet"> | ||
<style> | ||
.tagger + .tagger { | ||
margin-top: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Tagger Example</h1> | ||
<input type="text" value="charles,louis,michel" name="tags" /> | ||
<input type="text" value="charles,louis,michel" name="tags2" /> | ||
<input type="text" value="charles,louis,michel" name="tags3" /> | ||
<script src="tagger.js"></script> | ||
<script> | ||
var t1 = tagger(document.querySelector('[name="tags"]'), { | ||
allow_duplicates: false, | ||
allow_spaces: true | ||
}); | ||
var t2 = tagger(document.querySelector('[name="tags2"]'), { | ||
allow_duplicates: false, | ||
allow_spaces: true, | ||
link: function() { return false; } | ||
}); | ||
var t3 = tagger(document.querySelector('[name="tags3"]'), { | ||
allow_duplicates: false, | ||
allow_spaces: true, | ||
link: function(name) { | ||
return `javascript:alert('${name}');`; | ||
} | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters