You can do that with Slash Commands using string command type. The definitions can be annoyed to prepare, but if your use case is straight forward enough then it will be sufficed.
Just declare a /tag
string command that will be unrolled into <span class = 'class-tag1'> </span>
or <span class = 'class-tag2'> </span>
, etc.