How to use the babylonjs-editor.Tools.CreateElement function in babylonjs-editor

To help you get started, we’ve selected a few babylonjs-editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BabylonJS / Editor / src / tools / notes / notes.ts View on Github external
public async create(): Promise {
        // Metadatas
        this.editor.core.scene.metadata = this.editor.core.scene.metadata || { };
        const metadatas = this.editor.core.scene.metadata;

        if (!metadatas.notes)
            metadatas.notes = '';
        
        // Area
        this.textArea = Tools.CreateElement('textarea', 'NOTES-TEXT-AREA', {
            'width': '100%',
            'height': '100%',
            'resize': 'none'
        });
        this.textArea.textContent = metadatas.notes;
        this.textArea.addEventListener('keyup', () => metadatas.notes = this.textArea.value);
        this.divElement.appendChild(this.textArea);
    }
}