I'm working on a tinyMCE plugin, and it has to show a full list of FontAwesome icons. To show them, the code is (reduced) this:
{
type: 'listbox',
name: 'caixa_icone',
label: 'Icon²',
'values': [
{
text:'address-book',
value:'address-book',
icon:' fa fa-address-book'
},
{
text:'address-book-o',
value:'address-book-o',
icon:' fa fa-address-book-o'
},
{
text:'anchor',
value:'anchor',
icon:' fa fa-anchor'
},
{
text:'archive',
value:'archive',
icon:' fa fa-archive'
},
{
text:'area-chart',
value:'area-chart',
icon:' fa fa-area-chart'
},
// ETC...
All values to show icons will result in something like 5k lines of code. How can I, if possible, store those values to reuse anywhere inside the script?
Example (structural, of course not working):
var variables = "{
text:'address-book',
value:'address-book',
icon:' fa fa-address-book'
},
{
text:'address-book-o',
value:'address-book-o',
icon:' fa fa-address-book-o'
}";