tantaman / strut

Strut - An Impress.js and Bespoke.js Presentation Editor
http://strut.io
GNU Affero General Public License v3.0
1.82k stars 483 forks source link

text block can only have one format #24

Closed jancborchardt closed 12 years ago

jancborchardt commented 12 years ago

Formatting text always formats the whole text block. It is thus not possible to have a headline which is half bold and half regular. As a workaround you have to create two text blocks and align them manually, which takes work and can look stupid.

Instead, it should be possible to select part of the text in a block and format only that. The other text should retain the format.

tantaman commented 12 years ago

What do you think of integrating https://github.com/xing/wysihtml5/ to take care of the text editing?

jancborchardt commented 12 years ago

Yes, I actually thought about doing that for Litewrite also. It would basically replace the current controls there are with that external tool, right?

In the next step, the controls should then be contextual, just appear when text is selected and directly next to the text (like PopClip or http://etchjs.com [which seems to have a bit of dependencies …]). We can just do a simple JS control that gets the position of the selection and then let the controls appear there. What do you think?

tantaman commented 12 years ago

It looks like wysihtml5 only supports predefined colors, one font and predefined font sizes. I feel like that may be too restrictive.. I'm not sure how much work it would be to add those items.

tantaman commented 12 years ago

so many wysiwygs.... http://jejacks0n.github.com/mercury/documentation/#the-story

jancborchardt commented 12 years ago

As also referenced in #34, it’s probably not good to go full-on wysiwyg. I’d say we just need bold and italic. Different fonts and sizes are very unlikely and we should not encourage that anyway. Alignment is negligible for now also. It’s mainly about highlighting individual words, so bold and italic should be enough (it can always be extended once it hurts).

(I would even go so far as to completely remove underlining from the options because it is bad typographic style.)

tantaman commented 12 years ago

I've integrated Etch.js into Strut. There are still a couple of issues (font color doesn't apply to the current selection, the font size readouts don't update) but it is up if you want to take a look. I'm also not a fan of how long the button bar is.

jancborchardt commented 12 years ago

Nice! Yeah, the long button bar is a bit weird.

3 ideas for that: 1) let’s remove the text align (center, left, right) altogether or 2) make it a toggle (only left and center) 3) remove the eraser because everything is a toggle anyway

Also, the bar should be a bit transparent to not completely obstruct the background. For example .8 opacity.

tantaman commented 12 years ago

Closing this as GH-68 covers the remaining problems.