-
Notifications
You must be signed in to change notification settings - Fork 75
Unwanted page break #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @guilhermeagirardi,
|
Hi @motla ! Thank you for the feedback and the suggestion. What I did was add a callback at the end of the conditional test of that function. else if (!sub_child.childNodes.length || sub_child.tagName.match(/h\d/i) || do_not_break(sub_child)) { <vue-document-editor
ref="editor"
v-model:content="content"
:do_not_break="(sub_child) => sub_child.tagName.match(/section/i)"
/> This was enough for me at the time to define different breakage prevention situations. |
Well done! Great implementation 👍 |
Hi @guilhermeagirardi |
Hi @motla! It was no big deal. I'm honored to know that. Thankss! 😁 |
Hi @motla
I don't want this page break to happen for my sections.
I am unable to prevent this behavior via CSS alone, as it seems that vue-document-editor does not seem to take into consideration page-break-before, page-break-after or page-break-inside. What do I need to do?
Ps.: My sections are in
<section>
elements.The text was updated successfully, but these errors were encountered: