My team working in a project using asp.net mvc3(c#). Based on the project requirement,we need to implement page break like Microsoft Word. I need to save the pagebreak and the page size may be a4, letter, legal, etc.
Is it possible to control the page size of the content in the ckeditor and insert page breaks shown inside the editor when it crosses a certain height or size, the same way it works in MS Word>
Is there is any alternative solution?
Like graphicdivine says, use print CSS to accomplish what you need to do. Create a css class that has a page-break-before
definition, and dynamically add that class to the first element of the page after the break.
You could also do something like this:
br.pageBreak {
page-break-after: always;
}
and then insert a <br class="pageBreak" />
at the point where you need a page break.
More info:
Page-breaks: http://www.w3.org/TR/css-print/#s.8.2
Page size: http://www.w3.org/TR/css-print/#s.8.3
An old A List Apart article: http://www.alistapart.com/articles/goingtoprint/
Unfortunately, I do not know if it is possible to alter CKEditor in this way without hassle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With