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

Use '__has-no-content' class name to display placeholder text #461

Merged
merged 1 commit into from
Aug 25, 2016

Conversation

bantic
Copy link
Collaborator

@bantic bantic commented Aug 23, 2016

This causes the placeholder to appear even when the editor div is not
wholly devoid of elements.

Possible BREAKING CHANGE: The placeholder text is now absolutely
positioned (at top: 0) of the editor div. If a user has applied their
own padding to the editor div the placeholder may not show up in the
correct location. The solution is to add a CSS rule that overrides the
top to match the value of the padding-top:

.__mobiledoc-editor.__has-no-content:after {
  top: <value of padding-top>;
}

Also: The editor now has a min-height: 1em;
to ensure that the placeholder has a space in which to be displayed.

Fixes #407 #171

This causes the placeholder to appear even when the editor div is not
wholly devoid of elements.

Possible BREAKING CHANGE: The placeholder text is now absolutely
positioned (at `top: 0`) of the editor div. If a user has applied their
own padding to the editor div the placeholder may not show up in the
correct location. The solution is to add a CSS rule that overrides the
`top` to match the value of the `padding-top`:
```
.__mobiledoc-editor.__has-no-content:after {
  top: <value of padding-top>;
}
```

Also: The editor now has a `min-height: 1em;`
to ensure that the placeholder has a space in which to be displayed.

Fixes #407 #171
@bantic bantic force-pushed the ensure-placeholder-appears-on-empty-content branch from 0a56540 to 764347c Compare August 25, 2016 14:36
@bantic bantic merged commit 11452fe into master Aug 25, 2016
@bantic bantic deleted the ensure-placeholder-appears-on-empty-content branch August 25, 2016 15:13
@bantic
Copy link
Collaborator Author

bantic commented Aug 25, 2016

released in v0.10.8-beta.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant