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

Add Block: Text #312

Closed
mtias opened this issue Mar 23, 2017 · 6 comments
Closed

Add Block: Text #312

mtias opened this issue Mar 23, 2017 · 6 comments
Labels
[Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@mtias
Copy link
Member

mtias commented Mar 23, 2017

Attributes

  • Alignment: Left, Right, Center.
  • Formatting bar.

Markup

<p>The quick brown fox jumps over the lazy dog.</p>

States (see all)

image

@mtias mtias added Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Task Issues or PRs that have been broken down into an individual action to take labels Mar 23, 2017
@joyously
Copy link

joyously commented Mar 26, 2017

Is the Text block for when you already know you have text? Or a generic block that anything can be typed into? The reasoning is that paragraphs can contain phrasing content only, not flow content. So if you know it's only text, use <p>. But if there is flow content, (<table>, <pre>, <blockquote>, <div>, <hr>, <h1-6>, etc.), you better use <div> or split these to separate blocks as they are entered (think cut and paste).

@mtias
Copy link
Member Author

mtias commented Mar 27, 2017

The idea is all those would be separate blocks, but remains to be seen in implementation how it works.

@aduth
Copy link
Member

aduth commented Apr 6, 2017

How should the markup look if the text is aligned?

Currently it's applied as an inline style attribute (style="text-align: center;").

We may want to consider moving away from this, or at least allow themes to define support for a better alternative (styles applied via class?) not too much unlike the html5 theme support.

@joyously
Copy link

joyously commented Apr 6, 2017

Typically, if you select a portion of the text to style, it would be by adding a <span> wrapper with an inline style. Much as I don't like inline styles, for text alignment and bold and italic, I think they are okay.
If no text is selected, I assume the block is, and the inline style would go on the block's tag.

@jasmussen jasmussen added this to the Prototype Parity milestone Apr 20, 2017
@jasmussen
Copy link
Contributor

As a small update on this, we should explore two approaches for writing and wrangling text in the editor:

  1. a paragraph is a single block with controls docked at the top of this block
  2. multiple paragraphs in succession is a single block, with controls docked at the top of the block

We should build both, see which one works best, and keep only the one that works best. See #447 (comment) for a mockup.

@mtias mtias removed this from the Prototype Parity milestone Apr 27, 2017
@mtias mtias added [Feature] Blocks Overall functionality of blocks and removed Framework Issues related to broader framework topics, especially as it relates to javascript labels May 3, 2017
@jasmussen
Copy link
Contributor

Closing as fixed 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

4 participants