Skip to content
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

Heading Options #104

Open
patrickheeney opened this issue Nov 11, 2013 · 13 comments
Open

Heading Options #104

patrickheeney opened this issue Nov 11, 2013 · 13 comments

Comments

@patrickheeney
Copy link

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.

@cjbell
Copy link
Contributor

cjbell commented Nov 13, 2013

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..

@cjbell
Copy link
Contributor

cjbell commented Nov 19, 2013

Using the pull request from #118 this would be fairly trivial to implement.

@patrickheeney
Copy link
Author

@cjbell88 Are you thinking it would use the new controls to create new buttons for h1-h6 versus on the toolbar?

@andflett
Copy link
Contributor

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.

@patrickheeney
Copy link
Author

@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.

@andflett
Copy link
Contributor

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.

@cjbell
Copy link
Contributor

cjbell commented Nov 19, 2013

Great shout both. 👍

@andflett
Copy link
Contributor

andflett commented Dec 9, 2013

Leaving this open but putting it into a future release milestone.

@pedroaxl
Copy link

pedroaxl commented Dec 9, 2013

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

@marioschubert
Copy link

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

@aggied
Copy link

aggied commented Jul 27, 2014

@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

@marioschubert
Copy link

@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?

@marioschubert
Copy link

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.

raffij pushed a commit that referenced this issue Mar 1, 2016
Extract sanitizer plugin into its own repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants