spell-me
v0.2.7
Published
A new way to spell characters for better readability
Downloads
17
Maintainers
Readme
This plugin provides a simple way to spell characters of a string and present it to the user. It supports various characters and symbols.
Usage
Include jQuery:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
Include plugin's code:
<script src="dist/spell-me.min.js"></script>
Call the plugin:
$("#code").spellMe({
className: "spellify",//multiple classes can be added to the table e.g. "table table-reponsive"
target: "#result",//id or class e.g. ".myClass"
getTabulatedResult: true // appends a table to the specified target
});
Guides
Call it on the element which contains the code and that's it. If you have your own way of representing the spellified code. Just set the getTabulatedResult option to false and use the returnWords method, it will return an array of the spellified code.
var spellifiedCode = $("#code").spellMe({
getTabulatedResult: false
}).returnWords();
//returns ["Alfa", "Romeo", "Tango"]
Available options:
className: "anyClass" ( Use this option to add a class to the table created.)
target: "target-ID/CLASS" (Specify the ID/CLASS of the element to which the result should be appended to.)
getTabulatedResult: true (true by default, returns a HTML table appended to the target
, if set to false it will give an array of the spellified characters)
Examples
Click here to see the demo.
Contributing
Check CONTRIBUTING.md for more information.
License
MIT License © Sahil Prajapati
Source
Characters source from Wiki