Quill editor apply style to text
<p>I'm using quill editor within primeng editor. I want to apply a style to the text while typing (text change).When I'm typing a text within slashes, i could have to apply a style and 2 slashes should be removed.
for example:
I'm using a /quill/ editor. 
this should be:  I'm using a <strong>quill</strong> editor.</p>

<p>the text only within the slashes should be applied the style. except the text within slashes should not be applied the style.</p>

<p>I have added the following code to Editor.ts</p>

<pre><code> this.quill.on('text-change', (delta, source) =&gt; {
            if (source == 'user') {
            this.highlightText();
            this.selfChange = true;
            let htmlValue = this.quill.getHTML();
            if (htmlValue == '&lt;div&gt;&lt;br&gt;&lt;/div&gt;') {
                htmlValue = null;
            }

            this.onTextChange.emit({
                htmlValue: htmlValue,
                textValue: this.quill.getText(),
                delta: delta,
                source: source
            });
            //if (this.selfChange)
            this.onModelChange(htmlValue);
            // }
        });

highlightText() {
        var text = this.quill.getText(),
            hashRegex1 = /\/[a-zA-Z\.\*\&amp;\s\d]*\//ig,
            match;

        // Try to clear all cssClass formats
        this.quill.formatText(0, this.quill.getLength(), 'cssClass', false);

        while (match = hashRegex1.exec(text)) {
            this.quill.formatText(match.index, match.index + match[0].length, 'cssClass', 'test');
            this.quill.deleteText(match.index, match.index + 1);
            var textLenth = match[0].length - 2;
            this.quill.deleteText(match.index + textLenth, match.index + textLenth + 1);
            this.quill.prepareFormat('bold', false);
            this.quill.focus();

        }
    }
</code></pre>

<p>but the issue is once highlighted a text, following text entering is getting highlighted(bold). i cannot stop highlighting text after highlighting a text then all text will be getting highlighted after a highlighting text. please help me on this.</p>