Answer the question
In order to leave comments, you need to log in
execCommand: how to use CSS in IE to set text-align option?
Hello. I'm trying to create my own wysiwyg editor, but I need to make sure that the code is the same in all browsers (why? below). When setting text centering in all browsers except IE, it happens like this: <div style="text-align:center;"></div>
In IE, for some reason, html parameters are used and it turns out like this: <div align="center"></div>
I tried to set styleWithCSS, it didn’t work, maybe I didn’t use
it
correctly
The code must be the same so that if the same code is opened in another browser, the parameters will not be generated.
Answer the question
In order to leave comments, you need to log in
<div align="center" style="text-align:center;"></div>
.yourClass
{
text-align: center;
align: center;
}
Do you mean assign a class?
It is required to make the command
set the parameter via CSS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question