Slate: Adding Headers and Footers

Created on 28 Aug 2018  路  3Comments  路  Source: ianstormtaylor/slate

Do you want to request a _feature_ or report a _bug_?

_feature_

What's the current behavior?

There is no ability to add a header and footer to every page

What's the expected behavior?

Ability to add header and footer to specified pages. Example: I have a 27 page document created, I want to be able to add a header to pages 1-15 and footer to pages 10-27

question

Most helpful comment

Hey, thanks for using Slate! Unfortunately, we can't offer support for usage questions in the issues here because it becomes overwhelming to maintain the project if the issues are filled with questions.

However, we do have a Slack channel and people are constantly asking and answering questions in there. So I'm going to close this issue, but I definitely recommend joining the Slack channel if you want to find people that might be able to help.

Thanks for understanding!

All 3 comments

I'm not sure I personally understand the feature request since Slate has no internal concept of a page. As such I don't think this should be a Slate feature since you can implement this already yourself as long as you have some easy concept yourself of what a page is; for instance each H1 starts a new page.

It becomes problematic if you want slate to create and manage pages (with headers and footers) based on how many lines are rendered, since this is not something that is easy to extract from a content editable at the moment. Which would mean a lot of unnecessary DOM measurements just to figure out where blocks are rendered (and then still you don't know the exact character breaks). This would essentially mean that Slate would have to move away from its current implementation and fully render the text itself to a canvas. This could be an interesting project alongside slate-react (a slate-canvas) but is a huge undertaking. We were doing this before and after 6 months ditched it for Slate.

But I might have misunderstood the request, and I'm not core to the project so just sharing my 2 cents.

@JSH3R0 Can you share your solution to "split pages" on your Slate editor?

Hey, thanks for using Slate! Unfortunately, we can't offer support for usage questions in the issues here because it becomes overwhelming to maintain the project if the issues are filled with questions.

However, we do have a Slack channel and people are constantly asking and answering questions in there. So I'm going to close this issue, but I definitely recommend joining the Slack channel if you want to find people that might be able to help.

Thanks for understanding!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexeiAndreev picture AlexeiAndreev  路  3Comments

markolofsen picture markolofsen  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments

vdms picture vdms  路  3Comments

bunterWolf picture bunterWolf  路  3Comments