mirror of
https://github.com/penpot/penpot.git
synced 2025-07-29 16:37:14 +02:00
Merge branch 'main' into develop
This commit is contained in:
commit
eff333cbaf
5 changed files with 51 additions and 30 deletions
|
@ -106,12 +106,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