954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Copying from ms word to jsp

Hi all!

I'm copying a poem from MS word ans pasting into a html text area. However only the first line of the text has a tab between the beginning of the phrase and the margin. All the subsequent phrases lose formatting and stay right next to left margin. It happens the same if I paste it into notepad or other text editor..,

Does anybody has some idea how to fix this?


Thanks in advance.

Kind Regards.

softDeveloper
Junior Poster in Training
67 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

You did not provide any code any above description is not helpful.
Are you reading word documents through some coding process or you just manually copy and paste from Word document to JSP expecting formatting will kept?

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

I am manually copying from a ms word 2010 text and pasting it into a html text area.

Example:

source text in word:

                                Example example example
                                Example example example
                                Example example example
                                Example example example

                       

Pasted text in html text area:

                                Example example example
Example example example
Example example example
Example example example
softDeveloper
Junior Poster in Training
67 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

You will need to apply formatting manually. Try to apply <pre></pre> around copied text if that solve your problem

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Hi thank you for your reply. Unfortunately

<pre></pre>


doesn't do it.

softDeveloper
Junior Poster in Training
67 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

the difficulty is that the tabs are lost when pasted from word into the html textarea..

softDeveloper
Junior Poster in Training
67 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 
the difficulty is that the tabs are lost when pasted from word into the html textarea..


Yes because formatting applies to only selected Microsoft products. The only thing you may possibly do is to write a CSS element, lets call it poem, on the each line you will need to place <br/> and once poem read from textarea apply CSS poem style to it.

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: