Open patrickheeney opened 11 years ago
This is a great idea and is something we've been toying with. It's also useful as an abstract concept for blocks, the idea of a switcher that can handle multiple states of blocks. Eg a list block handling an ordered and unordered list.
Would you be interested in having a go at implementing this? I'm thinking it could be a mixin the block..
Using the pull request from #118 this would be fairly trivial to implement.
@cjbell88 Are you thinking it would use the new controls to create new buttons for h1-h6 versus on the toolbar?
Totes agree, a state switcher is a lovely idea.
I wonder how we ensure people understand that headings are hierarchical though? Last thing we want is the old "I'll choose this h3 thing because I think it looks better than an h1"
Maybe that's just a wording/copy issue though!
Can we perhaps limit this to h1-3 until a requirement for more levels surfaces? Still stick by the old mantra that if you need to go past a third level of hierarchy, you're probably doing something wrong.
Sent from my iPhone
On 19 Nov 2013, at 21:41, Chris Bell notifications@github.com wrote:
Using the pull request from #118 this would be fairly trivial to implement.
— Reply to this email directly or view it on GitHub.
@andrewsprinz Good point. Some of the clients I work with would not understand the hierarchy and definitely would pick based on appearance. Maybe just the wording as you mentioned such as (Heading, Sub Heading, Topic?) instead of h1, h2, h3.
Love those, definitely more human than H1, H2 etc. :)
Sent from my iPhone
On 19 Nov 2013, at 22:09, Patrick Heeney notifications@github.com wrote:
@andrewsprinz Good point. Some of the clients I work with would not understand the hierarchy and definitely would pick based on appearance. Maybe just the wording as you mentioned such as (Heading, Sub Heading, Topic?) instead of h1, h2, h3.
— Reply to this email directly or view it on GitHub.
Great shout both. :+1:
Leaving this open but putting it into a future release milestone.
Hey guys, if you want to check it out, I did it using formatBlock command. The code isn't 100%, the regular expressions for toHTML methods are a little buggy, but I am working on it. https://gist.github.com/pedroaxl/7871887
Hello guys, I have implemented a heading block for my site. Maybe you have use of it. See gist: https://gist.github.com/marioschubert/683b3c5fc9d1135e7751
@marioschubert well done. For my use case I may tweak it slightly and change the numbers to something human like: xlarge, large, small, xsmall... or something like that.
I'm fairly new to ST and glad I stumbled on your gist. Perhaps we should see if the rest of the folks want that kept in the custom blocks repo
@aggied Thank you. Your welcome. :-) Regarding your size naming. I think this more in levels. I even think about adding Numbering like 1., 1.1, 1.2, 1.2.1, 1.2.2, ... So you can structure longer texts. The editors should focus on content and structure, not font sizes. That's just my opinion. This leads me to a TOC block. Coming soon.
@cjbell88 Should I file a pull request for the custom block repo? What has to be done before / therefore?
I have improved the heading block for my site. The currently selected level is now highlighted. Maybe you have use of it. See gist: https://gist.github.com/marioschubert/683b3c5fc9d1135e7751
In my rails back end I use CSS automatic numbering for the rendered headings. This does not work in editing mode, because of the nested divs. So numbering has to be done by javascript, but I haven't had not enough time for this, yet.
When adding a heading you should be able to change it to h1, h2, h3 (4, 5, 6?) in the formatter controls as well as the existing italic (is bold needed)? A button may be appropriate as well for those that use http://getbootstrap.com/css/#type-headings. Since these buttons are only needed for headings it would still keep the other block type formatter controls simple.