killair
killair

Reputation: 27

jquery Microsoft Word/Google Docs paging

I am trying to make a document writer with div contenteditable and would like to know if it is possible that when I am writing content, it will automatic viewed as pages.

My idea is to make an alternative word processor but got stuck with this.

From my research i found this http://jsfiddle.net/LukeGT/Vtdgh/2/

Which is really amazing to format content first time but cannot make it work dynamically.

My basic idea was to have

<div contenteditable="true">
content here will be displayed as paged somehow :/
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
content here
</div>

Can someone help me out?

Upvotes: 0

Views: 155

Answers (1)

Bryant Makes Programs
Bryant Makes Programs

Reputation: 1694

You can create pagebreaks when printing content. Not sure if this is entirely what your looking for:

.page { page-break-before: always; }

And then attach the page class to ever page element. This will create separate pages when printing. You could add a border to the page elements to make them visibly separate on the page.

Upvotes: 0

Related Questions