|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
Hi All,
I need a free Rich Text Editor for a CMS and after a lot of searching i decided to use "HTML Rich Text Area". So far so good. The problem is that when i use quotes, double quotes or backslashes as text everything becomes a mess. I replaced (") with (\"), (') with (\') (i use PHP) and so on but the editor returns something like this \\\''\''\\''\'\'\'\'\'\. Is it possible to avoid this and how? Help me please!! |
|
#2
|
||||
|
||||
|
im not sure what you mean by "rich text editor" but you could make use of escape() and unescape() consitering that all those could be converted to the escape format. ie: [space] = %20
hope that helps a little, colton22 |
|
#3
|
||||
|
||||
|
text editor
The problem with using someone else's code is that you have to learn how to use it before you know if it does what you want it to and doesn't do what you don't want it to. Are you using the tcp/IQ app? If so it may be worth the effort to contact them for support.
In any case if you feel confident in your skills you could save back-up files of the app and try modifying the source. Take a look at it any way to see what it's doing. My guess is that it's adding slashes to "special" characters. The backslash is one of these, so entering a \ before another special character will result in \\\" You could try escape as colton22 suggested, another thing would be entities like < for < or " for " etc. |
|
#4
|
|||
|
|||
|
That's right Mittineague. I'm using the tcp/iq app.
The problem is that i don't feel very confident in my javascript skills. Can you suggest me any other app; Thanks for the you time guys. |
|
#5
|
||||
|
||||
|
what you can do if you want to use the escape or unescape, i made something...
Code:
<HTML>
<HEAD>
<SCRIPT>
function encode(form,inp,outp) {
if (inp!="") {form.outp.value=escape(inp);}
else {form.inp.value=unescape(outp);}
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#000000">
<FORM NAME="info">
<TEXTAREA NAME="inp" ROWS="20" COLS="100"></TEXTAREA>
<BR /><INPUT TYPE="button" VALUE="Encode!" ONCLICK="encode(window.document.info,window.document.info.i np.value,window.document.info.outp.value)" /><BR />
<TEXTAREA NAME="outp" ROWS="20" COLS="100"></TEXTAREA>
</FORM>
</BODY>
</HTML>
copy it to a html file and run it, it will have you enter text in the top textarea, you press convert and it will convert it to the escaped way. if you delete the contents of the top box, and insert escaped text to the bottom, it will unescape it (decode it) and place the outcome to the top box. what did you want this for? i could make a function to do this for you colton22 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Rich Text Editor - Backslash & Quotes Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|