mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
parent
4c4e5a9c95
commit
d36f3618c0
4 changed files with 4 additions and 7 deletions
|
@ -8,6 +8,7 @@
|
|||
@placeholderText="Breaking news, a big story, a special offer, or any other message"
|
||||
@html={{this.content}}
|
||||
@onChangeHtml={{this.setContent}}
|
||||
@onBlur={{@onChange}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Component from '@glimmer/component';
|
||||
import {action} from '@ember/object';
|
||||
import {debounce} from '@ember/runloop';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default class AnnouncementSettingsContentComponent extends Component {
|
||||
|
@ -10,14 +9,9 @@ export default class AnnouncementSettingsContentComponent extends Component {
|
|||
return this.settings.announcementContent;
|
||||
}
|
||||
|
||||
updatePreview() {
|
||||
debounce(this, this.args.onChange, 300);
|
||||
}
|
||||
|
||||
@action
|
||||
setContent(html) {
|
||||
this.settings.announcementContent = html;
|
||||
this.settings.save();
|
||||
this.updatePreview();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
placeholderText=@placeholderText
|
||||
html=@html
|
||||
onChangeHtml=@onChangeHtml
|
||||
onBlur=@onBlur
|
||||
)
|
||||
}}></div>
|
|
@ -128,7 +128,8 @@ export default class KoenigLexicalEditorInput extends Component {
|
|||
>
|
||||
<KoenigComposableEditor
|
||||
darkMode={this.feature.nightShift}
|
||||
onChange={this.args.onChange}
|
||||
onChange={props.onChange}
|
||||
onBlur={props.onBlur}
|
||||
isSnippetsEnabled={false}
|
||||
singleParagraph={true}
|
||||
className="koenig-lexical-editor-input"
|
||||
|
|
Loading…
Add table
Reference in a new issue