mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Removed the default editor placeholder on edit
refs https://github.com/TryGhost/Team/issues/1206 - Because we allow <br> in the editor, the editor placeholder was remaining when editing (<p><br></p>). This clean the editor placeholder.
This commit is contained in:
parent
042a772ebe
commit
e6fa0bc449
1 changed files with 4 additions and 0 deletions
|
@ -415,6 +415,10 @@ export default Component.extend({
|
|||
// inline markup that directly maps to HTML elements
|
||||
getCleanHTML() {
|
||||
if (this.editor && this.editor.element) {
|
||||
if (this.editor.element.classList.contains('__has-no-content')) {
|
||||
// Removes the default editor placeholder
|
||||
return '';
|
||||
}
|
||||
return cleanBasicHtml(this.editor.element.innerHTML, {allowBr: true});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue