This is a migrated thread and some comments may be shown as answers.

[Solved] End of page detection

1 Answer 97 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 18 May 2009, 09:24 AM
As part of an internal project where a user might type a letter using RadEditor, I've been asked if it's possible to indicate to that user if the text they're typing is going onto a second page (assuming an A4 page as set within the browser with intent to print).

The system being replaced, which is rather old, accomplished this through word counting, but this simply isn't practical with the new system. Is there anything in RadEditor that can accomplish this?

Also, where Paragraph tags are used, is there an option to change the space between paragraphs to single line rather than double, or have I missed something in the browser settings/basic HTML?

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 18 May 2009, 11:06 AM
Hi Steve,

If I understand your scenario correctly, you need to precisely position HTML content in a web editor and later print it. Unfortunately, when dealing with a web environment, browsers have their limitations and it is hard to print HTML content exactly as you see it on the screen.

In addition, you cannot automatically divide the content in the editor to different pages. Searching for <p> breaks gives the most natural break, but those breaks might occur on an undesired location. That is why the only reliable way to break the page is by manual inserting a page break style. The style='page-break-before: always' will tell the printer that this is the end of the current page and will print the subsequent content on a new page. You can found more information the this KB article: Implementing a Page-break Button.

As for your second question, to reduce the extra space between the paragraph blocks inside the editor's content area, you should set a global CSS paragraph style in your page, i.e.


   margin:0px; 
}
  


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Steve
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or