Merge branch 'main' into develop

This commit is contained in:
Andrey Antukh 2021-04-14 13:52:09 +02:00
commit eff333cbaf
5 changed files with 51 additions and 30 deletions

View file

@ -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");
}