|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Execcommand problem...
i just made a WYSIWYG editor for my CMS and everything works great, however, i would like to change the markup output made by the execcommand thingy. e.g. The exxeccommand attribute of 'justifycenter' gives a HTML output like this:
Code:
<p align=center>...</p> Code:
<p align="center">...</p> So my inquire is: How can i get the attribute values being displayed with quotation marks in the HTML output of my WYSIWYG? I hope you can help me out with this and thanks in advance! ![]() |
|
#2
|
|||
|
|||
|
normally there is no problen using attributes without quots but if you want so i think there si no stright way.
|
|
#3
|
|||
|
|||
|
What do you mean by "there is no stright way" I know of several WYSIWYG editors both commercial and open source which produce a HTML output with quotation marks in the attribute values. So obviously there must be a way to do that with javascript, but HOW?
See for your self in these two examples: Tiny Editor FCKeditor Greets. |
|
#4
|
|||
|
|||
|
You may have to use regular expressions or your own custom exec function in order to do this. The exxeccommand is what it is on each browser and AFAIK there is no way to affect how it formats markup. The editors you mention are open source so it's possible you could determine how they do it if you want to scan the code.
|
|
#5
|
|||
|
|||
|
Yeah i know! but i don't know how to do that! or otherwise i woldn't be here asking for help!
Please somebody help! ![]() |
|
#6
|
|||
|
|||
|
This is a low traffic forum. You could try asking at DevShed Forums' JavaScript forum.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Execcommand problem... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|