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:
replace size value


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.

 


2c
New User

Sep 29, 2003, 8:49 AM

Post #1 of 13 (5443 views)
Shortcut
replace size value Can't Post

Hi.
I want to convert the html i get from htmlarea to xml. I can't do that because the values of the tags is not in ("").

fx: How do I change this line:

<P><FONT size=4>test</FONT></P>

To

<P><FONT size="4">test</FONT></P>


Luis
Veteran

Sep 29, 2003, 7:55 PM

Post #2 of 13 (5431 views)
Shortcut
Re: [2c] replace size value [In reply to] Can't Post

Hi 2c:

This expression should put double quotes around all attributes:

//"double quoted" attributes
str= str.replace(/ ([^=]+)=([^" >]+)/gi, " $1=\"$2\"");

I hope this helps.


Don't give up!!
http://webstationone.com/test/htmlarea


2c
New User

Sep 30, 2003, 2:14 AM

Post #3 of 13 (5425 views)
Shortcut
Re: [Luis] replace size value [In reply to] Can't Post

WHere do I put that in my code ?


Luis
Veteran

Sep 30, 2003, 11:37 AM

Post #4 of 13 (5417 views)
Shortcut
Re: [2c] replace size value [In reply to] Can't Post

Hi 2c:

It must there be a place where the editor updates the contents of the textarea.
I don't know V 3.0, so I cannot tell you exactly in what part, but I took a look to the code and I guess you can do it when submiting the form:

Instead of:

textarea.form.onsubmit = function() {
editor._textArea.value = editor.getHTML();
};


Make it:

textarea.form.onsubmit = function() {
editor._textArea.value = editor.getHTML();
editor._textArea.value= editor._textArea.value.replace(/ ([^=]+)=([^" >]+)/gi, " $1=\"$2\"");
};


The line in red must be a single line (no wrapping).


Don't give up!!
http://webstationone.com/test/htmlarea


2c
New User

Oct 1, 2003, 6:05 AM

Post #5 of 13 (5396 views)
Shortcut
Re: [Luis] replace size value [In reply to] Can't Post

Sorry my mistake. I posted in the wrong forum :(

I'm using version 2.03

I still can't get it to work. I'm trying to change the text parsed from the editor on the server instead.

Thanks for your help anyway :)


Luis
Veteran

Oct 1, 2003, 11:28 AM

Post #6 of 13 (5392 views)
Shortcut
Re: [2c] replace size value [In reply to] Can't Post

Hi 2c:

If you a are using V2.3 it's much easier. Send me a copy of your editor and I'll gladly do it for you. It's faster than trying to explain what to do.

Greetings.


Don't give up!!
http://webstationone.com/test/htmlarea


(This post was edited by Luis on Oct 1, 2003, 11:28 AM)


2c
New User

Oct 2, 2003, 3:21 AM

Post #7 of 13 (5377 views)
Shortcut
Re: [Luis] replace size value [In reply to] Can't Post

Hi

This is the page where I include html area.



<script language="Javascript1.2">
_editor_url = "documents/htmlarea/";
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }



</script>
<!--ACTION="documents/htmlarea/output.jsp"-->
<FORM METHOD=POST ACTION="documents/htmlarea/output.jsp" >
<textarea rows="28" name="edit" id = "edit" cols="100">

</textarea>
<script language="JavaScript1.2">
editor_generate('edit');
</script>
<br/>
<INPUT TYPE= SUBMIT VALUE = "save">
<form>


Luis
Veteran

Oct 2, 2003, 11:25 AM

Post #8 of 13 (5370 views)
Shortcut
Re: [2c] replace size value [In reply to] Can't Post

Hi 2c:

The file I need is editor.js.


Don't give up!!
http://webstationone.com/test/htmlarea


chrissi
New User

Oct 8, 2003, 10:51 AM

Post #9 of 13 (5329 views)
Shortcut
Re: [Luis] replace size value [In reply to] Can't Post

hello everybody outside germany, hello Luis!

I would really like to have this problem solved, too. I'm using the 2.02 and am not afraid of making changes to the code (allready did so). can you post the solution, please?

- sorry for my english,

regards,

christopher
making myths


Luis
Veteran

Oct 8, 2003, 11:20 AM

Post #10 of 13 (5327 views)
Shortcut
Re: [chrissi] replace size value [In reply to] Can't Post

Hi Chrissi:

I cannot post instructions on this because I don't have documented anything and I don't have the time to do it. Changes are needed in several places and might vary depending if you have some other features implemented.

You can either to post your editor to do it for you or download mine and figure out yourself what to do. It already includes the fix.


Don't give up!!
http://webstationone.com/test/htmlarea


chrissi
New User

Oct 8, 2003, 12:20 PM

Post #11 of 13 (5323 views)
Shortcut
Re: [Luis] replace size value [In reply to] Can't Post

Hello Luis,

thanks for your quick reaction. So, where can I download your editors version?

regards,

chrissi
making myths


Luis
Veteran

Oct 8, 2003, 3:52 PM

Post #12 of 13 (5297 views)
Shortcut
Re: [chrissi] replace size value [In reply to] Can't Post

Hi chrissi:

http://webstationone.com/test/htmlarea

The zip file doesn't include my last modifications, which are not available yet:

Forms Manager
Color Palletes
Page Background Color
Page Image Background

I'll made them available as soon as I can.


Don't give up!!
http://webstationone.com/test/htmlarea


chrissi
New User

Oct 8, 2003, 4:29 PM

Post #13 of 13 (5293 views)
Shortcut
Re: [Luis] replace size value [In reply to] Can't Post

hello Luis,

ah... dump me, did't see the link cause of the colors (blue on violet) thx for yout time!

regards,

christopher
making myths

(This post was edited by chrissi on Oct 8, 2003, 4:43 PM)

 
 
 


Search for (options)