Text align extension #925
Unanswered
zvitek
asked this question in
Questions & Help
Replies: 1 comment
-
Hello @zvitek ! Seems you forgot to add get schema() {
return {
attrs: {
align: {
default: 'left',
},
},
parseDOM: [{
tag: "span", //<------
style: 'text-align',
getAttrs: value => ({
align: value
}),
}],
toDOM: mark => {
return ['span', {
class: `block text-${mark.attrs.align}`
}, 0];
}
};
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have this extension for text align support
Everything works well and I get a HTML like
This HMTL code I save to database and done.
Then load this HTML to editor for next edit and here is the problem because editor remove class definition and load only
Can you help me define where can be a problem?
Thank you
Version
Beta Was this translation helpful? Give feedback.
All reactions