function tinySetup(config) { if (typeof tinyMCE === 'undefined') { setTimeout(function () { tinySetup(config); }, 100); return; } var cssId = 'cssIdFontAwesomePro'; // you could encode the css path itself to generate id.. if (!document.getElementById('cssIdFontAwesomePro')) { var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.id = cssId; link.rel = 'stylesheet'; link.type = 'text/css'; link.href = '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'; link.media = 'all'; head.appendChild(link); } $("