mirror of
https://github.com/Hopiu/ep_page_view.git
synced 2026-03-16 20:20:24 +00:00
fixes for views
This commit is contained in:
parent
6d2081c59d
commit
a0756e4116
3 changed files with 5 additions and 3 deletions
2
index.js
2
index.js
|
|
@ -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>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue