Skip to content

Commit

Permalink
Add placeholder to rich editor
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Apr 13, 2021
1 parent d958191 commit 2a4fa5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion static/js/com/post-composer.js
Expand Up @@ -139,7 +139,7 @@ class PostComposer extends LitElement {
></app-button>
</div>
<div class="${this.isExtendedOpen ? '' : 'hidden'}">
<app-rich-editor></app-rich-editor>
<app-rich-editor placeholder="Add more to your post! This is optional, and there's no character limit."></app-rich-editor>
</div>
</section>
Expand Down
3 changes: 2 additions & 1 deletion static/js/com/rich-editor.js
Expand Up @@ -32,6 +32,8 @@ export class RichEditor extends LitElement {
await loadTinyMCEAsNeeded()
tinymce.init({
target: this.querySelector('.editor'),
placeholder: this.getAttribute('placeholder') || '',
content_style: "body {margin: 0.6rem 0.7rem;} p {margin: 0.5em 0;}",
menubar: false,
plugins: [
'advlist autolink lists link image charmap',
Expand Down Expand Up @@ -78,7 +80,6 @@ export class RichEditor extends LitElement {
})
}
})
// Add more to your post! This is optional, and there's no character limit.
}

disconnectedCallback () {
Expand Down

0 comments on commit 2a4fa5c

Please sign in to comment.