htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
Toggle source and text. quotes all disapear


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


jaspertje
Novice

Jan 11, 2005, 3:52 AM

Post #1 of 11 (3160 views)
Shortcut
Toggle source and text. quotes all disapear Can't Post

Lo all,

When i toggle between the TEXT MODE and the WYSIWYG, and i put in the following line:

<input type='button' value='test'> Or <input type="button" value="test"> the code returns with:

<input type=button value=test>

without the single or double quotes.. This is very annoying when u get a value with more then one word. Can anybody tell me where the solution is, cos I got stuck. When i allert this.getInnerHTML before going back to WYSIWYG, it does have the quotes... but after the setInnerHTML its all gone :(


sleemanj
User

Jan 11, 2005, 6:40 AM

Post #2 of 11 (3147 views)
Shortcut
Re: [jaspertje] Toggle source and text. quotes all disapear [In reply to] Can't Post

Does it do it for all elements, or just input, and what browser?


James Sleeman
PHP Programmer


jaspertje
Novice

Jan 11, 2005, 7:41 AM

Post #3 of 11 (3142 views)
Shortcut
Re: [sleemanj] Toggle source and text. quotes all disapear [In reply to] Can't Post

It goes for all the elements (tested on td).. and im using IE6


sleemanj
User

Jan 11, 2005, 10:10 AM

Post #4 of 11 (3128 views)
Shortcut
Re: [jaspertje] Toggle source and text. quotes all disapear [In reply to] Can't Post

Can you check this editor (click) and tell me if it does the same please.


James Sleeman
PHP Programmer


jaspertje
Novice

Jan 11, 2005, 12:46 PM

Post #5 of 11 (3110 views)
Shortcut
Re: [sleemanj] Toggle source and text. quotes all disapear [In reply to] Can't Post

It does the same (even removes the value :)).. i tried it with single and double quotes(i entered the next html:

<inpyt type='text' value='lala'>

<inpyt type="text" value="lala">


sleemanj
User

Jan 11, 2005, 9:52 PM

Post #6 of 11 (3106 views)
Shortcut
Re: [jaspertje] Toggle source and text. quotes all disapear [In reply to] Can't Post

But what about with other elements. Are you saying that, say

<span style="font-family:Arial, Helvetica">

becomes

<span style=font-family:Arial, Helvetica>

?


James Sleeman
PHP Programmer


jaspertje
Novice

Jan 12, 2005, 1:35 AM

Post #7 of 11 (3101 views)
Shortcut
Re: [sleemanj] Toggle source and text. quotes all disapear [In reply to] Can't Post

Im saying that <td align="right"> becomes <td align=right>



I asume that is is for al the elements yeah :(


sleemanj
User

Jan 12, 2005, 7:31 AM

Post #8 of 11 (3090 views)
Shortcut
Re: [jaspertje] Toggle source and text. quotes all disapear [In reply to] Can't Post

Interesting. What is your specific IE version code please (see Help > About). I'll have a look in my fork and see if I can reproduce.


James Sleeman
PHP Programmer


jaspertje
Novice

Jan 12, 2005, 8:54 AM

Post #9 of 11 (3084 views)
Shortcut
Re: [sleemanj] Toggle source and text. quotes all disapear [In reply to] Can't Post

IE 6.0.2800.1106.xpsp2



Need more?


sleemanj
User

Jan 12, 2005, 8:59 AM

Post #10 of 11 (3078 views)
Shortcut
Re: [jaspertje] Toggle source and text. quotes all disapear [In reply to] Can't Post

That'll do. I'll reply here when I've had a chance to check it out.


James Sleeman
PHP Programmer


bjand
New User

Jan 30, 2005, 6:05 AM

Post #11 of 11 (2975 views)
Shortcut
Re: [jaspertje] Toggle source and text. quotes all disapear [In reply to] Can't Post

hi! i had same problem. i solved it by changing the code
in htmlarea.js
of course, when i updated the newest ver. then I had to change this stuff again.

here are some tips

find function

HTMLArea.getHTMLWrapper

some lines below you can find this

} else if (outputRoot) {
closed = (!(root.hasChildNodes() || HTMLArea.needsClosingTag(root)));
html = "<" + root.tagName.toLowerCase();
var attrs = root.attributes;
for (i = 0; i < attrs.length; ++i) {
------------------
Now you find
var a = attrs.item(i);
if (!a.specified)
{continue;}
-------------
replace with this -> this one don't lose value tags in input elem.
-------------
if (!a.specified && !(a.nodeName.toLowerCase() == "value" && a.nodeValue != ""))
{
continue;
}
-------------
2. fix -> this one don't lose blaablaa from <form action="blaablaa" <- the reason of my envolvement
-------------
find in same function some lines below

if (typeof root[a.nodeName] != "undefined" && name != "href" && name != "src" && !/^on/.test(name)) {
value = root[a.nodeName];
---
and replace value = root[a.nodeName];
---
if (name == "action" || name == "value" )
{
value = a.nodeValue;
} else
{
value = root[a.nodeName];
}
-----------------------------
3. fix -> find after }else{
-----------------------------
if (HTMLArea.is_ie && (name == "href" || name == "src")) {
value = editor.stripBaseURL(value);
}

and replace with

if (HTMLArea.is_ie && (name == "href" || name == "src" || name == "action" || name == "value")) {
value = editor.stripBaseURL(value);
}

-----------------------------
i hope this helps.

 
 
 


Search for (options)