title: Quill: How to apply a CSS style to the some text programmatically?
body: <p>As part of a search function in my application, I need to apply a CSS style to a portion of the text present in the editor.</p>
  
  <p>I found <a href="https://www.scalablepath.com/blog/using-quill-js-build-wysiwyg-editor-website/" rel="nofollow noreferrer">this page</a> which seems to show how to do this by using <code>Attributor</code>. However, it demonstrates applying the style by pressing a button which is recognized by Quill and not the actual code to do it programmatically.
  <code>formatText</code> seems to be a possibility but it requires defining the style in the function call while the style is in a loaded css file.</p>
  
  <p>In a "regular" context, I would wrap the text in a span and set a class attribute on it.</p>
  
  <p>What is the Quill way to achieve this?</p>