Tagor
asked on
[JS] execCommand() output lowercase?
execCommand(some-command) returns HTML code which is uppercase. Is there a way to get lowercase HTML as output?
ASKER
test.document.execCommand( com).toLow erCase();
Unfortunately this doesn't work.
Unfortunately this doesn't work.
What is the command you are trying t execute, and what is the string that is suppossedt ob coming back from the function.
Cd&
Cd&
Is this an WYSIWYG HTML editor? Are you using execCommand() to format text bold, italic etc. ?
I don't think you can format execCommand() to output HTML in lowercase format. You probably have to lowercase the tags when you save the content(if it's an HTML editor). A regexp on your server should do the trick. If you explain a little bit more what and why you want it to be lowercase, maybe we can give you a more specific answer.
Batalf
I don't think you can format execCommand() to output HTML in lowercase format. You probably have to lowercase the tags when you save the content(if it's an HTML editor). A regexp on your server should do the trick. If you explain a little bit more what and why you want it to be lowercase, maybe we can give you a more specific answer.
Batalf
ASKER
That's exactly what I want, Batalf.
It returns for example "<STRONG>" instead of "<strong>".
It returns for example "<STRONG>" instead of "<strong>".
Why do you need it in lowercase format?
What serverside language are you using? You should probably convert it to lowercase on the server.
Batalf
What serverside language are you using? You should probably convert it to lowercase on the server.
Batalf
ASKER
I am using PHP. However that won't convert it to lowercase.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
points to Batalf IMHO.
Cd&
Cd&
str=execCommand(someComman
or
if (str1.toLowerCase()=='body
Cd&