tags:

views:

20

answers:

2

My question is this. There are some texts,reports written on the webpage under the div tag. This text should be changed once a week. But, the person who is updating can't use the simple copy and paste because, when he do that the whitespaces, enters are ignored. So, my purpose is creating a panel to change only that part of webpage with proper design. Is there any way to do it. Or is there anyway that the copy and paste text works properly.

an example : 

1-)John is going to work today.
2-)Michael is at home.

But when we copy and paste this to html code under the div tag, result is:


1-)John is going to work today.2-)Michael is at home.

I hope i could make myself clear.

A: 

The problem isn't that they are within a <div> the problem is that they are in the same paragraph. Markup like

 <div><p>
 1-) John</p><p>
 2-) Michael</p>
 </div>

or even

 1-) John<br/>

would likely work. I put the <div> in to show that it doesn't matter. A div is a "flow" which lets the browser break lines when it needs to without copy-pastable breaks. <p> and <br/> tags break the flow.

msw
yes but, the problem is the new coming admin don't know about the br tags and also don't have time for this. I was designer of this webpage and now i'm leaving the job, so new admin should change the content without getting involved with html tags you know.
LuckySlevin
This is why i'm asking a panel kinda thing.
LuckySlevin
Then leave them with Markdown or a Wiki. People who can't handle HTML shouldn't be touching HTML.
msw
@LuckySlevin - If you need to update this via a panel, then you need to write both server and client code. The alternative is to teach the new person how to use a WYSIWYG editor, such as Dreamweaver.
Gert G
A: 

Wrap the new content in a PRE tag. E.g.

<pre>
1-)John is going to work today.
2-)Michael is at home.
</pre>

It will keep the formatting of the text.

Gert G
you saved my day. Thanks.
LuckySlevin
I'm glad it helped. :)
Gert G