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 - Support Requests:
Microsoft WORD COPY +PASTE


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.

 


xrayeye
Novice

Feb 9, 2005, 4:42 AM

Post #1 of 11 (60513 views)
Shortcut
Microsoft WORD COPY +PASTE Can't Post

Sirs,
I use HTMLArea v3.0. Its nice and all, but I have a serious problem with copy-pasting material from Word.
It just doesnt go into the database.
I use PHP +APAche + MySQL.
the MySQL field type is TEXT.
Please PLease Please
show me a way .Its driving me Mad,I can't get my project online without it


reg
Novice

Feb 9, 2005, 11:34 AM

Post #2 of 11 (60436 views)
Shortcut
Re: [xrayeye] Microsoft WORD COPY +PASTE [In reply to] Can't Post

If it is your intention to keep all the Word characters, you may have to set this.killWordOnPaste to false in htmlarea.js

HTH

Reg


xrayeye
Novice

Feb 14, 2005, 5:50 AM

Post #3 of 11 (60328 views)
Shortcut
Du- uh -h !!!! [In reply to] Can't Post

I tried doing it
Its already set to false.
Is it the MySQL problem ?? ? ? ? ? ? ?
Please tell me.
If you can,please tell me how to add data collected from HTMLarea embedded inside a form into a MySQL database.
Please.I need help.
Unsure


FxF
Novice

Feb 14, 2005, 7:17 AM

Post #4 of 11 (60323 views)
Shortcut
Re: [xrayeye] Du- uh -h !!!! [In reply to] Can't Post

maybe you should provide us with some more information. I've been using an older version of HTMLArea for two years now saving all data in a MySQL text-field without any problems.

What exactly happens? Does any data get saved in the db? Or nothing at all? Is your data messed up somehow? What are you magic-quotes settings? Do you get any mysql errors?


xrayeye
Novice

Feb 15, 2005, 7:16 AM

Post #5 of 11 (60283 views)
Shortcut
Re: [FxF] Du- uh -h !!!! [In reply to] Can't Post

Extra info ?
Well, when i paste the Word contents into HTmlarea and hit the submit button, the confirm page shows the data is getting added to the database.
Crazy
But in reality it never does get added to the database.
The main Index page is supposed to list the latest 3 posts.
It never displays the latest post.
Thats killing me.
I'll send the code if you want to see it.
Thanks for replying.


FxF
Novice

Feb 15, 2005, 10:55 AM

Post #6 of 11 (60274 views)
Shortcut
Re: [xrayeye] Du- uh -h !!!! [In reply to] Can't Post

have you tried turing on error_reporting in php? try setting it to

error_reporting(E_ALL)

to see if any errors show up when the code is trying to save to the database!

Also, when you just type something in that htmlarea instead of copy pasting it, does it work then or not? If not, then it probably an error in the php script somewhere, not the htmlarea. However, since many developers around here know PHP as well, I'm sure we can find a solution.


irobotst
Novice

Feb 15, 2005, 11:43 PM

Post #7 of 11 (60267 views)
Shortcut
Re: [xrayeye] Du- uh -h !!!! [In reply to] Can't Post

Because I dont know exactly where the Problem is try this:

I made this code to controll the Submitting of my Form with HTMLArea with php and mySQL

If you want you can make extra working by adding this Function to htmlarea.js:

HTMLArea.prototype._YourWorkOnTheTextOrCodeBeforeSubmitting = function(){

}


In my Site I Post the Form like this:

In Form - Tag:

<form action="" method="POST" name="yourFormID" id="yourFormID">
Important: action="" !

And the Button:
<input type="button" onclick=javascript:YourSubmit() value="Send">

The functions:

function YourSubmit(){
// Globalvar editor,yourFormID
editor._YourWorkOnTheTextOrCodeBeforeSubmitting();
editor._textArea.value = editor.getHTML(); // Fill Textarea with Iframe-Content
if(!proofTheForm()){ return;}

JSFormSubmit('yourFormID','<?php echo $_SERVER['PHP_SELF']; ?>'); // Here You can insert other URLs then $_SERVER['PHP_SELF'] to submit to
}
// This Code now is only to submit Your Form manually Maybe you use another ---------------------------------

function JSFormSubmit(formid,url,parameter){
// 12-01-2005
var st;
var obj = FindObj(formid);
if(obj){
st = url;
if(parameter != undefined){
st += '?' + parameter;
}
obj.action = st;
obj.submit();
} else {
alert('Bug....');
}
}
function FindObj(n, d) {
// Changed Code from Macromedia Dreamweaver
var p,i,x;
if(!d) { d=document;}
if((p=n.indexOf("?"))>0 && parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if(!(x=d[n]) && d.all){
x=d.all[n];
}
for (i=0;!x&&i<d.forms.length;i++){
x=d.forms[n];
}
for(i=0;!x && d.layers && i<d.layers.length;i++){
x=bkFindObj(n,d.layers.document); // Rekursiver Anteil fuer Suche in Layern
}
if(!x && d.getElementById){
x=d.getElementById(n);
}
return x;
}

Then You can get th Text from the Textarea if you write
<textarea id="textareaid">.....</textarea>
with $a = $_POST['textareaid'];
!!!! maybe You have to Escape the $a for masql like: !!!!
$a = mysql_escape_string($a);
I neednt.
Now you can insert OR update into your database
You can show the $a (echo or so) or print_r($_POST) and controll where the bug is.

Hope this helps


xrayeye
Novice

Feb 17, 2005, 6:32 AM

Post #8 of 11 (60200 views)
Shortcut
Re: [FxF] Du- uh -h !!!! [In reply to] Can't Post

hey,
First FxF,thanks a lot for taking the pains to reply.
Yes, the text TYPED into the HTMLArea editor POSITIVELY GETS ADDED to the database.
Its the WORD copy-pasted material that turns out to be a bitc*. I'm trying out various things that you folks have suggested.

Thanks a lot,FxF.
I really need help.
thanks again.Smile


thetoaster
New User

Feb 17, 2005, 12:48 PM

Post #9 of 11 (60177 views)
Shortcut
Re: [xrayeye] Du- uh -h !!!! [In reply to] Can't Post

maybe you have to add slashes before hitting it to database...


Code
$content = addslashes($content);

and after this try the following to see, if its an mysql-error

Code
$sql = "Insert Into ..."; 
mysql_query($sql) OR die("Error with $sql:<br>".mysql_error());



xrayeye
Novice

Feb 18, 2005, 6:25 AM

Post #10 of 11 (60121 views)
Shortcut
Re: [thetoaster] Du- uh -h !!!! [In reply to] Can't Post

hey toaster
thanks for posting in ,man.
Well i tried the error handling part.
Here's what I tried.
It gave me an "query is empty" error
Well,tell me the code is right.
And does that error mean Nothing is going in to the database?????
what might cause this error >????

Code
$result= MYSQL_QUERY("INSERT INTO literature (tol,author,content,name,date)"."VALUES ('$tol','$auth','$cont','$name','$dat')"); 
mysql_query($result) OR die("Error with $result:<br>".mysql_error());



thanks and cheers


(This post was edited by xrayeye on Feb 18, 2005, 6:28 AM)


thetoaster
New User

Feb 21, 2005, 12:50 AM

Post #11 of 11 (60034 views)
Shortcut
Re: [xrayeye] Du- uh -h !!!! [In reply to] Can't Post

Why do you have an "." in here

Code
(tol,author,content,name,date)"."VALUES ('

I always suggest, to enter the sql-statement first to a string, to have the possibility to echo it out.
You are trying to do a query with the result of a query, this wont work:

Code
$result= MYSQL_QUERY... 
mysql_query($result)

so this will work:

Code
$sql = "INSERT INTO literature (tol,author,content,name,date) VALUES ('$tol','$auth','$cont','$name','$dat') ;" ; 
$query = MYSQL_QUERY($sql)
OR die("Error with SQL Syntax: $sql<br>".mysql_error());


 
 
 


Search for (options)