mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-20 21:59:41 +02:00
Page showing, page edit, move API to /api/ (#10)
This commit is contained in:
parent
ff09f695d0
commit
730eff7995
18 changed files with 316 additions and 133 deletions
|
@ -7,8 +7,9 @@ import Header from 'codex.editor.header';
|
|||
export default class Editor {
|
||||
/**
|
||||
* Creates Editor instance
|
||||
* @property {object} initialData - data to start with
|
||||
*/
|
||||
constructor() {
|
||||
constructor({initialData}) {
|
||||
this.editor = new CodeXEditor({
|
||||
tools: {
|
||||
header: {
|
||||
|
@ -18,7 +19,7 @@ export default class Editor {
|
|||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
data: initialData || {
|
||||
blocks: [
|
||||
{
|
||||
type: 'header',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue