diff --git a/frontend/src/app/render_wasm/api/texts.cljs b/frontend/src/app/render_wasm/api/texts.cljs index 3ded360e2c..bbc41bf1e4 100644 --- a/frontend/src/app/render_wasm/api/texts.cljs +++ b/frontend/src/app/render_wasm/api/texts.cljs @@ -80,7 +80,7 @@ font-size (f/serialize-font-size font-size) line-height (f/serialize-line-height (get span :line-height) paragraph-line-height) - letter-spacing (f/serialize-letter-spacing (get paragraph :letter-spacing)) + letter-spacing (f/serialize-letter-spacing (get span :letter-spacing)) font-weight (get span :font-weight paragraph-font-weight) font-weight (f/serialize-font-weight font-weight) diff --git a/frontend/text-editor/src/editor/controllers/SelectionController.js b/frontend/text-editor/src/editor/controllers/SelectionController.js index 869c4b620e..9a452e4795 100644 --- a/frontend/text-editor/src/editor/controllers/SelectionController.js +++ b/frontend/text-editor/src/editor/controllers/SelectionController.js @@ -1967,9 +1967,14 @@ export class SelectionController extends EventTarget { this.setSelection(newTextSpan.firstChild, 0, newTextSpan.firstChild, 0); } // The styles are applied to the paragraph - else { + else + { const paragraph = this.startParagraph; setParagraphStyles(paragraph, newStyles); + // Apply styles to child text spans. + for (const textSpan of paragraph.children) { + setTextSpanStyles(textSpan, newStyles); + } } return this.#notifyStyleChange();