fixes for views

This commit is contained in:
John McLear 2013-11-21 15:34:13 +00:00
parent 6d2081c59d
commit a0756e4116
3 changed files with 5 additions and 3 deletions

View file

@ -14,7 +14,7 @@ exports.getLineHTMLForExport = function (hook, context) {
var header = _analyzeLine(context.attribLine, context.apool);
if (header) {
var inlineStyle = getInlineStyle(header);
return "<span style='page-break-before: always'>" + context.text.substring(1) + "</span>";
return "<span style='page-break-before: always;page-break-inside: avoid;'>" + context.text.substring(1) + "</span>";
}
}

View file

@ -1,5 +1,6 @@
.pageBreak{
page-break-before: always;
page-break-after: always;
-webkit-region-break-inside: avoid;
border-bottom: 1px dotted #AAA;
width:100%;
height:1px;

View file

@ -88,8 +88,9 @@ exports.aceDomLineProcessLineAttributes = function(name, context){
if( context.cls.indexOf("pageBreak") !== -1) { var type="pageBreak"; }
var tagIndex = context.cls.indexOf(type);
if (tagIndex !== undefined && type){
// NOTE THE INLINE CSS IS REQUIRED FOR IT TO WORK WITH PRINTING! Or is it?
var modifier = {
preHtml: '<div class="pageBreak">',
preHtml: '<div class="pageBreak" style="page-break-after:always;page-break-inside:avoid;-webkit-region-break-inside: avoid;">',
postHtml: '</div>',
processedMarker: true
};