mirror of
https://github.com/penpot/penpot.git
synced 2025-07-30 04:48:35 +02:00
🐛 Fix typography unlinking.
This commit is contained in:
parent
14359d9acf
commit
a8565dc2c2
4 changed files with 39 additions and 30 deletions
|
@ -109,12 +109,18 @@ export function applyInlineStyle(state, styles) {
|
|||
let content = null;
|
||||
|
||||
for (let style of styles) {
|
||||
const [p, k, _] = style.split("$$$");
|
||||
console.log("applyInlineStyle", style);
|
||||
|
||||
const [p, k, v] = style.split("$$$");
|
||||
const prefix = [p, k, ""].join("$$$");
|
||||
|
||||
content = state.getCurrentContent();
|
||||
content = removeInlineStylePrefix(content, selection, prefix);
|
||||
content = Modifier.applyInlineStyle(content, selection, style);
|
||||
|
||||
if (v !== "z:null") {
|
||||
content = Modifier.applyInlineStyle(content, selection, style);
|
||||
}
|
||||
|
||||
state = EditorState.push(state, content, "change-inline-style");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue