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.

Recommended Answers

All 6 Replies

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?

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

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

Hi thank you for your reply. Unfortunately

<pre></pre>

doesn't do it.

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.