parent
2a07b94bd4
commit
5e98c78493
@ -40,6 +40,7 @@
|
||||
@didCreateEditor={{this.onEditorCreated}}
|
||||
@onChange={{@onBodyChange}}
|
||||
@uploadUrl={{this.uploadUrl}}
|
||||
@accentColor={{this.accentColor}}
|
||||
/>
|
||||
|
||||
{{!-- <KoenigEditor
|
||||
|
@ -1,9 +1,12 @@
|
||||
import Component from '@glimmer/component';
|
||||
import ghostPaths from 'ghost-admin/utils/ghost-paths';
|
||||
import {action} from '@ember/object';
|
||||
import {inject as service} from '@ember/service';
|
||||
import {tracked} from '@glimmer/tracking';
|
||||
|
||||
export default class GhKoenigEditorReactComponent extends Component {
|
||||
@service settings;
|
||||
|
||||
containerElement = null;
|
||||
titleElement = null;
|
||||
koenigEditor = null;
|
||||
@ -17,6 +20,14 @@ export default class GhKoenigEditorReactComponent extends Component {
|
||||
return this.args.title === '(Untitled)' ? '' : this.args.title;
|
||||
}
|
||||
|
||||
get accentColor() {
|
||||
const color = this.settings.get('accentColor');
|
||||
if (color && color[0] === '#') {
|
||||
return color.slice(1);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
@action
|
||||
registerElement(element) {
|
||||
this.containerElement = element;
|
||||
|
@ -88,6 +88,7 @@ export default class KoenigReactEditor extends Component {
|
||||
didCreateEditor={this.args.didCreateEditor}
|
||||
onChange={this.args.onChange}
|
||||
uploadUrl={this.args.uploadUrl}
|
||||
accentColor={this.args.accentColor}
|
||||
/>
|
||||
</Suspense>
|
||||
</ErrorHandler>
|
||||
|
Loading…
Reference in New Issue
Block a user