a7c4991af5
no issue - fixed API returning "Invalid mobiledoc structure" errors when `mobiledoc:null` is sent in the payload alongside `lexical: '{...}'` - updated Admin's `posts` and `pages` adapters to always add `?formats=mobiledoc,lexical` because the API doesn't return `lexical` by default - added `lexical` attribute to Admin's Post model - updated `lexical-editor` controller and related components to work with `lexical` always being a JSON string rather than a parsed object - updated `<KoenigLexicalEditor>` to pass through the lexical state string as initial state and wired up the `onChange` prop
17 lines
506 B
JavaScript
17 lines
506 B
JavaScript
import ApplicationAdapter from 'ghost-admin/adapters/application';
|
|
|
|
export default class Page extends ApplicationAdapter {
|
|
// posts and pages now include everything by default
|
|
buildIncludeURL(store, modelName, id, snapshot, requestType, query) {
|
|
return this.buildURL(modelName, id, snapshot, requestType, query);
|
|
}
|
|
|
|
buildQuery(store, modelName, options) {
|
|
if (!options.formats) {
|
|
options.formats = 'mobiledoc,lexical';
|
|
}
|
|
|
|
return options;
|
|
}
|
|
}
|