madebymany / sir-trevor-js

Rich content editing entirely re-imagined for the web
http://madebymany.github.io/sir-trevor-js/
MIT License
4.51k stars 400 forks source link

Fixed position block #89

Open sntran opened 10 years ago

sntran commented 10 years ago

It would be nice to allow a block to have a fixed position. Maybe a block option fixedPosition: true || integer whether being true will set it fixed at the location it was added, or an integer to move it to that position number and fix it there.

Need to take into account of this block being reordered, either through the positioner or the drag and drop control, or other block moves to this block's position.

andflett commented 10 years ago

This is interesting, could you explain a use case for this? We've not come across such a requirement so far.

Senne commented 10 years ago

A use case would be header blocks for example. I'm building an editor with Sir Trevor where articles can have a header with a title, some meta-data (author, reading time, date, ...) and a background image. This header isn't required (for short posts for example), but when added it should always be fixed at the top.

sntran commented 10 years ago

That would be my use case as well.

Sent from my phone. On Dec 11, 2013 8:39 AM, "Senne Van Den Bogaert" notifications@github.com wrote:

A use case would be header blocks for example. I'm building an editor with Sir Trevor where articles can have a header with a title, some meta-data (author, reading time, date, ...) and a background image. This header isn't required (for short posts for example), but when added it should always be fixed at the top.

— Reply to this email directly or view it on GitHubhttps://github.com/madebymany/sir-trevor-js/issues/89#issuecomment-30324874 .