htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
Using Louis' Editor & Saving via <textarea> Problem...?


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.

 


gmilhem
New User

Aug 1, 2003, 7:17 PM

Post #1 of 24 (14193 views)
Shortcut
Using Louis' Editor & Saving via <textarea> Problem...? Can't Post

Apparently Loius is the GURU Here...! Thanx dude!

I am using a version Louis supplied to Pierre (prenaud)that allows saving an html page to your drive. I adapted it to submit via a Perl Script. The file writes fine, but it always saves the original loaded content... not the changes made in the Editor after loading the stored content! (I have been using the html v 2. just fine with this method)

Any clues to what might be happening there? Below is the basic form info:

Being Submitted via:
<script language="javascript">
function DoSubmit(aForm) {

document.forms[aForm].submit();

}

<form name="realViewForm" id="myform" action="starter_inputcontrols.cgi" method="post">
<input type="hidden" name="controlType" value="edited">
<input type="hidden" name="dirName" value="">
<input type="hidden" name="directory" value="">
<input type="hidden" name="newDirectory" value="">
<input type="hidden" name="dirPath" value="">
<input type="hidden" name="fieldName" value="newpage.2.new.1">
<input type="hidden" name="pageName" value="newpage.html">
<input type="hidden" name="contentNameInput" value="">
<input type="hidden" name="origControlType" value="edited">
<input type="hidden" name="elementType" value="realView">
<textarea name="contentName" id="contentName" style="width:100%; height:400" rows="1" cols="20"><FONT class=bodyTextHeadline>Testing </FONT></textarea><br>

<script language="JavaScript1.2" defer>
editor_generate('contentName');
</script>

</form>

Thanx for your help.


Luis
Veteran

Aug 1, 2003, 8:31 PM

Post #2 of 24 (14184 views)
Shortcut
Re: [gmilhem] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi gmilhen:

I'm not a guru but I am always willing to help.
I don't have any clue here. Could I see your editor.js?


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


mmcw
User

Aug 19, 2003, 2:22 AM

Post #3 of 24 (14105 views)
Shortcut
Re: [gmilhem] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

I have the same problem!

Did you - in the mean time - found the problem?


gmilhem
New User

Aug 21, 2003, 2:20 PM

Post #4 of 24 (14085 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Thanks Louis,

I have attached the entire page that uses the editor.js code (code is there also). Again I have verified the text file as actually writing, but with the content that was loaded prior to editing with "html area".

Thanks for your help.
Attachments: ezeditor.html (110 KB)
  ezeditor.html (110 KB)


Luis
Veteran

Aug 21, 2003, 11:52 PM

Post #5 of 24 (14078 views)
Shortcut
Re: [gmilhem] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

There is not save function enabled here. Sorry I cannot help, your page is very complicated. It takes hours to find a single thing in there.

You can download my zip file and I if you have questions i can help from there on.


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


gmilhem
New User

Aug 22, 2003, 11:02 AM

Post #6 of 24 (14060 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Thanx... This editor code is unchanged from your original supplied to prenaud... However here is a different approach that may be quicker to address my issue:

How do I change the "Save" (as it is in your code) function, from saving an html page to my local drive - to submitting the edited content in the <textarea> to a script via the javascript function I use on the working current version of HTMLarea as below.
Submit Funtion:
function DoSubmit(aForm) {
document.forms[aForm].submit();
}

Calling the function:
<a href="javascript:DoSubmit('realViewForm');">

Form Submission:
<form action="thisscript.cgi" method="post">


The submission is saving using the above method, however it is saving the text that was loaded into the editor, prior to editing.

Thanks again for your time.


hooky_nl
Novice

Sep 25, 2003, 12:19 PM

Post #7 of 24 (13929 views)
Shortcut
Re: [gmilhem] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

I recently updated my editor to the the one made by Louis, but i got the same problem. Whenever I put a value in the textarea, this value gets posted, although the editor works fine (also the getHTML function). It looks like the value I load with php overrules the value set by htmlarea.... i just can't figure it out. Furthermore the word importer as a button doesn't work, unfortunately. Importing with copy and paste works fine.
Isn't it time to update the origional version to a stable one with some new functionality Tongue
I hope anyone has found a solution yet....

p.s. this is my code:

<?

// Get existing data from our session, if we already have one
require_once("session.php");
// Try to find out which node to display
require_once("node.php");
// get global variables
require_once("config.php");

?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>BEELDSPRAAK: WYSIWYG Editor</TITLE>
<SCRIPT>
function stoperror(){
return true
}
window.onerror=stoperror
</SCRIPT>
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "htmlarea/"; // URL to htmlarea files
_editor_field = "";
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
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>
<STYLE TYPE="text/css">
.headtext { font-size:10pt;font-weight:bold; }
TD, DIV {font:9pt Verdana,Arial, Helvetica, sans-serif;}
</STYLE>
</head>
<body>
<form action="htmlarea/adminsubmit.php" method="POST" name="contentForm">
<input type="hidden" name="nodeID" value="<?=$nodeID?>">
<a href="javascript:alert(editor_getHTML('contentField'));">getHTML</a>&nbsp;&nbsp;
<textarea name="contentField" cols="90" rows="25"><?=$node->getContent()?></textarea>
<input type="submit" name="mode" value="opslaan en sluiten">
<input type="button" onclick="window.close()" value="close"><font face="Verdana, Arial, Helvetica, sans-serif" size ="1">&nbsp; pagina: <a href="#" onclick="opener.location.href='/?nodeID=<?=$nodeID;?>'"><?=BASEURL . "?nodeID=" . $nodeID; ?></a></font>
</form>
<script language='JavaScript1.2'>
editor_generate('contentField');
</script>
</body>
</html>


bdc2
New User

Sep 25, 2003, 12:45 PM

Post #8 of 24 (13924 views)
Shortcut
Re: [hooky_nl] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

I'm also having trouble POSTing data using Luis' editor.js

The textarea is in a form <form name="FORMdescription" method="post" action="newsletter.asp">

...and a submit button <input type="submit" name="Submit_Description" value="Submit"> is used to submit the form to the same page. The POSTed data does not seem to reflect any changes made in the editor though, so I can't use the POST response in my page. Is this by design?

Great code btw Luis.

BDC.


Luis
Veteran

Sep 25, 2003, 12:59 PM

Post #9 of 24 (13920 views)
Shortcut
Re: [hooky_nl] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi hooky_nl:

My version is totally stable and bugs free. I rarely post a mod which is not fully tested under all Win and IE versions. The only thing that doesn't work are context menus when using several instances of htmlarea, which is not a concern for me because I never use multiple instances.

The Word opener needs you to have ActiveX enabled in your computer. Read the help file for instructions.

I don't know php and don't know your script, but I bet your problems are in your PHP code.

Greetings.


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


hooky_nl
Novice

Sep 25, 2003, 1:15 PM

Post #10 of 24 (13915 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hmmm, I have to dissappoint you.
I just stripped my page from all php content en it still doesn't work...
Now it keeps posting "blabla"....
So if it's not php, what can it be?
Is it possible to save from within the script, as a different approach to the problem.
The js file hasn't been modified, exept for the menu list. I tried to set the value of the textarea through javacript (copying the value from one inputfield to the htmlarea-field, but that also didn't work. If you have a backup of any versions prior to this one, maybe i can find out where the problem is, as I saw that a few other people have the same problem posting the vaiables (in the other forum)

Thanxs in advance,

Mark
(www.beeldspraak.com)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>BEELDSPRAAK: WYSIWYG Editor</TITLE>
<SCRIPT>
function stoperror(){
return true
}
window.onerror=stoperror
</SCRIPT>
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "htmlarea/"; // URL to htmlArea files
_editor_field = "";
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
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>
<STYLE TYPE="text/css">
.headtext { font-size:10pt;font-weight:bold; }
TD, DIV {font:9pt Verdana,Arial, Helvetica, sans-serif;}
</STYLE>
</head>
<body bgcolor="#C0C0C0" >
<form action="htmlarea/adminsubmit.php" method="POST" name="contentForm">
<input type="hidden" name="nodeID" value="<?=$nodeID?>">
<textarea name="htmlcontent" cols="90" rows="25">blabla</textarea>
<input type="submit" name="mode" value="opslaan en sluiten">
<input type="button" onclick="window.close()" value="close">
</form>
<script language='JavaScript1.2'>
editor_generate('htmlcontent');
</script>
</body>
</html>


(This post was edited by hooky_nl on Sep 25, 2003, 1:45 PM)


Luis
Veteran

Sep 25, 2003, 4:00 PM

Post #11 of 24 (13896 views)
Shortcut
Re: [hooky_nl] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Yes I have older copies but at home. I can have access to them until evening. (San Diego Time)

Can you attach a copy of your editor to look for possible causes?

As you said you have not modified it, sure it is a picky detail since it works well in my side. It was what made me think it was your PHP.

Greetings.


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


shivag
New User

Sep 25, 2003, 4:05 PM

Post #12 of 24 (13894 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

I too have the same problem with Luis's editor!

I tried to use it with Squirrelmail and found that anything I type is not getting sent whereas when I use the editor to forward/reply to some emails, whatever is in the forwarded content goes. If I type something in the forwarded email it doesnt get updated and sent.

I have used the normal htmlarea with squirrelmail and it works fine.

Shiva


hooky_nl
Novice

Sep 25, 2003, 5:35 PM

Post #13 of 24 (13887 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi louis,

Here are the upload and js file. I hope you can simulate the problem... i've been looking into, but i'm stuck :-)
Thanx in advance for your help!

Mark

mark@beeldspraak.com
Attachments: files.zip (25.7 KB)


Luis
Veteran

Sep 25, 2003, 9:17 PM

Post #14 of 24 (13879 views)
Shortcut
Re: [hooky_nl] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi hooky_nl:

It seems the editor.js in my zip file got corrupted somehow.

I'm sorry you've spent so much time trying to solve it. Please, download my editor again. I posted a new one.

http://www.webstationone.com/test/htmlarea/Editor.zip

Be aware this editor contains a new insert_link mod, which requires you to move fullscreen.html out of the popups directory and replace insert_link.html with the one inside the zip. If you still have problems, contact me again.

Greetings.


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


shivag
New User

Sep 25, 2003, 10:59 PM

Post #15 of 24 (13875 views)
Shortcut
Re: [gmilhem] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hey,

I checked out the CODE and found out why the new text is not getting updated!

In the function editor_updateOutput, somewhere around line 1351 there would be a line

contents = cleanHTML(contents);
contents = contents.replace(/<IMG id=((.|\s)+?) title=((.|\s)+?)name=\"MyAnchorGlyph">/gi, '<A NAME=$1></A>');

Just comment these 2 lines out. It will work!

Regards,

ShivaCool


hooky_nl
Novice

Sep 26, 2003, 4:14 AM

Post #16 of 24 (13864 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hy Louis, you made my day :-)
Everything works, except the word importer. It works locally, but not on my server, (the example.html gives the following error:

Line: 37
Error 'Document'is empty or not an oblect
URL: http://.... .../openword.htm

I don't get the active-x security message which I do get when i try it locally (from my desktop)...
What kan that be?

Thanx again!


gmilhem
New User

Sep 30, 2003, 9:07 PM

Post #17 of 24 (13789 views)
Shortcut
Re: [shivag] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi shavig...

I am using version 2.03.1 and I find "contents = cleanHTML(contents);" but not the other. I'll try commenting that ot to see if can get it to work.

Thanx!


Luis
Veteran

Oct 1, 2003, 11:32 AM

Post #18 of 24 (13775 views)
Shortcut
Re: [hooky_nl] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi hooky_nl:

You also need to add your local server address to the internet security zone.

See the help file about enabling ActiveX.

Greetings


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


Luis
Veteran

Oct 1, 2003, 11:35 AM

Post #19 of 24 (13773 views)
Shortcut
Re: [gmilhem] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi gmilhem:

contents = cleanHTML(contents); has nothing to do. The problem is that I confused the good editor.js with a buggy one when posted my zip file. I made the fix. You can download it again.

Greetings.


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


Gordz
Novice

Oct 16, 2003, 3:52 AM

Post #20 of 24 (13604 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi Luis...

I am also having the saving problem (corrupt file), but canít seem to get to your site or download the editor.zip file.... Is your site down?


Luis
Veteran

Oct 16, 2003, 4:01 AM

Post #21 of 24 (13603 views)
Shortcut
Re: [Gordz] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi Gordz:

http://www.webstationone.com/test/Editor.zip

greetings.


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


Gordz
Novice

Oct 16, 2003, 4:05 AM

Post #22 of 24 (13601 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

LIFE SAVER ! ! !



Thank you so much ! !


Hpecs
New User

Dec 26, 2003, 7:30 PM

Post #23 of 24 (12983 views)
Shortcut
Re: [Luis] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

trying to save my file as a html but dont know how Do you have any scripts on how to save


Luis
Veteran

Dec 31, 2003, 5:07 PM

Post #24 of 24 (12943 views)
Shortcut
Re: [Hpecs] Using Louis' Editor & Saving via <textarea> Problem...? [In reply to] Can't Post

Hi Hpecs:

If you mean saving to local disk, the function is enabled in my editor. You can download it at the address below.

Greetings


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

 
 
 


Search for (options)