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

Refactor rendering of editor element #460

Merged
merged 1 commit into from
Aug 23, 2016
Merged

Conversation

bantic
Copy link
Collaborator

@bantic bantic commented Aug 23, 2016

Adding a new class name ("__has-no-content") to the editor element when
the post has no content will simplify rendering of the placeholder text
later.

  • Add Post#hasContent (fixes Add Post#hasContent #335)
  • Add editor#focus()
  • Move EDITOR_ELEMENT_CLASS_NAME to renderers/editor-dom
  • Make the editor-dom renderer responsible for adding EDITOR_ELEMENT_CLASS_NAME
  • Make the editor-dom renderer responsible for adding EDITOR_HAS_NO_CONTENT_CLASS_NAME if post has no content

Adding a new class name ("__has-no-content") to the editor element when
the post has no content will simplify rendering of the placeholder text
later.

 * Add `Post#hasContent` (fixes #335)
 * Add `editor#focus()`
 * Move EDITOR_ELEMENT_CLASS_NAME to renderers/editor-dom
 * Make the editor-dom renderer responsible for adding EDITOR_ELEMENT_CLASS_NAME
 * Make the editor-dom renderer responsible for adding EDITOR_HAS_NO_CONTENT_CLASS_NAME if post has no content
@bantic bantic merged commit c9d4067 into master Aug 23, 2016
@bantic bantic deleted the editor-post-has-content branch August 23, 2016 22:41
@bantic
Copy link
Collaborator Author

bantic commented Aug 24, 2016

released in v0.10.7

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.

Add Post#hasContent
1 participant