It seems you are trying to add add separate class names for paragraphs which come out as an output of your stateToHTML(contenState) function from draft-js-export-html utility module?
If so, you just use the second inlineStyles option to stateToHTML function. Since text has an unstyled type by default out of all the default block types of draftjs, you could do
let options = {
UNSTYLED: {
attributes: {class: `your class name-${blockKey}`},
}
}
stateToHTML(contentState, options)
Where blockKey is the key of current block, to ensure that classNames aren't same for any two paragraphs. blockKey which could be easily extracted out.
Let me know if this is what you meant? If not, let me know what I didn't understand right.