MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

SchemaForm

MMO.editor · 1 symbole · générée le 30 Nov 2026

class

SchemaForm

SchemaForm.js:16

A form made from a JSON schema of mmo.editor (a section type's, a block's: SectionType), the page editor's own inputs -- text, rich text (<mmo-editor>), link, address, image (mmo.edms, « From the library »), choice, yes/no, number, list of items, group -- writing into a value object: what a record's form uses for its blocks (<mmo-schema-form>). The inputs are MMO.editor.PageEditor's, borrowed as they are: one way of editing a field, wherever it is; no language but one, no display level but the one given.

class MMO.editor.SchemaForm
Espace de noms
MMO.editor
Events: `change` (`detail`: the value) after each edit.
const form = new MMO.editor.SchemaForm(node, block.schema, article.blocks.event ?? {}, {uploadLabels: '"_TAGS/site/articles"'}); node.addEventListener('change', (e) => article.blocks.event = e.detail);

Index

BORROWED staticthe page editor's methods a form made from a schema uses
constructor(node, schema, value, options)
render()Draw the inputs of the schema's fields
changed()A field changed: told, with the whole value

Constantes1

BORROWED

staticSchemaForm.js:18

the page editor's methods a form made from a schema uses

static BORROWED = ['h', 't', 'emit', 'visible', 'filled', 'baseValue', 'defaults', 'translateExample', 'fieldInput', 'imageInput', 'queryInput', 'listInput'];

Méthodes3

constructor(node, schema, value, options)

SchemaForm.js:27
constructor(node, schema, value = {}, options = {})
nodeHTMLElement- where it is built
schemaObject- {properties: {...}}
value = {}Object- what it writes into (its fields' defaults fill what it lacks)
options = {}