-
Notifications
You must be signed in to change notification settings - Fork 152
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
Placeholder doesn't re-appear #407
Comments
I'm having same issue. I can't get the placeholder to display under any conditions. I can verify that the In my ember app this will not show a placeholder: I'm using mobiledoc-kit v 0.9.6 and ember-mobiledoc-editor 0.4.2 |
This is problematic when two editors are on the same page (which is the case for our client). |
This is because the placeholder is applied with css with This works when there's absolutely nothing rendered in the editor at all, but once the user has interacted with it then there's always a blank I can think of two workarounds to this when the mobiledoc is blank:
|
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
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
…older text (#461) 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
I just made the change @rlivsey suggested (see #461), and released in |
@bantic Just tested and works a charm 👍 |
@rlivsey Thanks for giving it a test drive! This is now part of the v0.10.8 release |
Hello,
Everybody loves placeholders! They help to recognize typing area and get work started.
Unfortunately, Mobiledoc-kit's placeholder is rather shy or lazy: after it showed up he will never come back, or as @mixonic said:
How to reproduce:
Expected behavior: placeholder should re-appear
Actual behavior: placeholder doesn't re-appear
Let's make placeholder great again! ✌️
UPDATE: actually, on my machine placeholder doesn't appear even in this minimalist setup https://github.com/lessless/mobiledoc-placeholder
The text was updated successfully, but these errors were encountered: