I use my own created bbcode [wiki] [/wiki] so every word encapsulated between these codes will create a link to my wiki. See code below. This works great.
if (show_wiki_dscn == true ){
var wiki_start = '<a class="fancywiki" href="http://www.domain.com/support/wiki-inline/';
var wiki_end = '" data-fancybox-type="iframe"><i class="fa fa-question-circle fa-1x"></i></a>';
$('div.content_body').each(function() {
$(this).html( $(this).html().replace( /\[wiki]/g, wiki_start ).replace( /\[\/wiki]/g, wiki_end));
})
} else {
var wiki_start = '<a class="pop-tooltip" href="http://www.domain.com/support/wiki/';
var wiki_end = '" target="blank" title="Read our wiki"><i class="fa fa-question-circle fa-1x"></i></a>';
$('div.content_body').each(function() {
$(this).html( $(this).html().replace( /\[wiki]/g, wiki_start ).replace( /\[\/wiki]/g, wiki_end));
})
}
Now my question. I would like to show the wiki "word" instead of the question mark.
So how do I copy [wiki]word[/wiki]
and replace <i class="fa fa-question-circle fa-1x"></i>
with the "word"