Suggestion: add mixed mode initiation sample
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
As there is the long-time open issue #138 that does not enable flat to be specified as HTML attribute, and just not to repeat the same attributes on many elements, I wanted to initialize JSBarcode with mixed-mode: the value as an attribute, anything else during initiation. As I haven't found any sample on how to do that, I have begone to experiment. And here it is
<svg class="barcode" jsbarcode-value="123456789012"></svg>
JsBarcode('.barcode').options({
format:'ean13',
height:25,
displayValue: false,
flat:true
// and so on
}).init()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No documentation file or test is named. Start by locating the existing JsBarcode examples or initiation documentation, then add the provided HTML and JavaScript mixed-mode example; done means users can see how to supply the value as an attribute and other options during initiation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100