|
Post by Elli on Aug 16, 2019 13:36:26 GMT -7
Bold Text Within Quotes Preview Bolds text within quotes, excluding attributes on elements.
Bottom of Thread Template
<script> $(function() { // Bold text within quotes function boldQuotes() { var $postMessage = $('.posts .post .message');
$postMessage.each(function() { var $this = $(this); var newContent = $this.html().replace(/(?<!\=)[\"\“](?![\/\>])(\S[^\"\“\”]+\S)[\"\”]/g, "<strong>\"$1\"</strong>");
$this.html(newContent); }); }
boldQuotes(); pb.events.on('afterSearch', boldQuotes); }); </script>
|
|