diff --git a/src/trix/views/piece_view.coffee b/src/trix/views/piece_view.coffee index b5ad76018..27f1e565d 100644 --- a/src/trix/views/piece_view.coffee +++ b/src/trix/views/piece_view.coffee @@ -70,6 +70,9 @@ class Trix.PieceView extends Trix.ObjectView if config.style styles[key] = value for key, value of config.style + if config.className + pendingElement.className = config.className + if Object.keys(styles).length element ?= makeElement("span") element.style[key] = value for key, value of styles