EsEditor
Componente que muestra un iframe
de Editor EsJS.
Examples
Basic Usage
esjs
consola.escribir("Hola mundo desde EsJS!")
Source:
md
<EsEditor>
```esjs
consola.escribir("Hola mundo desde EsJS!")
```
</EsEditor>
With Preview
esjs
importar { Terminal } from '@es-js/terminal'
Terminal.escribir('test')
Source:
md
<EsEditor hide-preview="false">
```esjs
importar { Terminal } from '@es-js/terminal'
Terminal.escribir('test')
```
</EsEditor>
Hide Console
esjs
importar { Terminal } from '@es-js/terminal'
Terminal.escribir('test')
Source:
md
<EsEditor hide-console="true" hide-preview="false">
```esjs
importar { Terminal } from '@es-js/terminal'
Terminal.escribir('test')
```
</EsEditor>
Hide Slot
esjs
importar { Terminal } from '@es-js/terminal'
Terminal.escribir('test')
Source:
md
<EsEditor hide-slot="true">
```esjs
importar { Terminal } from '@es-js/terminal'
Terminal.escribir('test')
```
</EsEditor>
Without Props
Source:
md
<EsEditor />
Hide Open Button
Source:
md
<EsEditor hide-open-button="true">
</EsEditor>
URL Src
Source:
md
<EsEditor src="https://editor.esjs.dev/?code=PTAEBEFMDcFdIDbUqWA7AhqAthgLgE4CWAXqAMYD2aoClAzqDQA7HaQENMBf7njAExQIs9DkRRDQAMSIAjahnLkiAOgBQAM3QrqoTfMXKiACjQBKUAG91oUNAwFQY4igC8oANoBddbfuOoFgeAAz%2BLhKqGADmBJDRjiYY5n52Dk5yoB4AjOHikFGx8YlyKf7pFNR4GAKUTh4ATP7%2B2BJohBiMJlTtNXWgADxMljZ2aYHkWUGgANSgcv52EQUxcQkE3Slj0x4L25ke5IuVvbUEMzP%2BAL6poHF4dZhOy%2Bo36gAqHK2YCKqQ9ORiHIiBt-AByAAyXGyIVArCIfC4aF4HC4UhEoAAyvlQFJZApMMZnNQAFxggA0oFU1IMBKUKhMMJSZR69EoIj%2BAKBIJM4KhjBhcLYqMYyMRgmEWGxrlxKHxRhUxLQZMp1NUtIVpiZ6jKQA&tests=A4JwrgpgRghgzgCgN4CgAEaDkBGADG0ASwFsIQB7ONAOwC-SK5MAuNAMzGoGNDzq0EASjSoMGGG0IhiMEAEkA5mBgAbCInRiMAbVwAaNNgNG0AJgMBmAwFYDADmNWzJiwBYAuns1bJUPjC4eBDxBbzRQjABfFEjQoA&layout=horizontal&hidePreview=true&hideEditor=false&hideConsole=false&hideTests=false&readonlyCode=false&readonlyTests=false&preview=%7B%22terminal%22%3Atrue%7D&previewTab=%7B%22console%22%3Atrue%2C%22flowchart%22%3Afalse%2C%22hidden%22%3Atrue%7D&language=esjs&hideOptions=false" />
Open URL
Source:
md
<EsEditor src="https://editor.esjs.dev/?code=PTAEBEFMDcFdIDbUqWA7AhqAthgLgE4CWAXqAMYD2aoClAzqDQA7HaQENMBf7njAExQIs9DkRRDQAMSIAjahnLkiAOgBQAM3QrqoTfMXKiACjQBKUAG91oUNAwFQY4igC8oANoBddbfuOoFgeAAz%2BLhKqGADmBJDRjiYY5n52Dk5yoB4AjOHikFGx8YlyKf7pFNR4GAKUTh4ATP7%2B2BJohBiMJlTtNXWgADxMljZ2aYHkWUGgANSgcv52EQUxcQkE3Slj0x4L25ke5IuVvbUEMzP%2BAL6poHF4dZhOy%2Bo36gAqHK2YCKqQ9ORiHIiBt-AByAAyXGyIVArCIfC4aF4HC4UhEoAAyvlQFJZApMMZnNQAFxggA0oFU1IMBKUKhMMJSZR69EoIj%2BAKBIJM4KhjBhcLYqMYyMRgmEWGxrlxKHxRhUxLQZMp1NUtIVpiZ6jKQA&tests=A4JwrgpgRghgzgCgN4CgAEaDkBGADG0ASwFsIQB7ONAOwC-SK5MAuNAMzGoGNDzq0EASjSoMGGG0IhiMEAEkA5mBgAbCInRiMAbVwAaNNgNG0AJgMBmAwFYDADmNWzJiwBYAuns1bJUPjC4eBDxBbzRQjABfFEjQoA&layout=horizontal&hidePreview=true&hideEditor=false&hideConsole=false&hideTests=false&readonlyCode=false&readonlyTests=false&preview=%7B%22terminal%22%3Atrue%7D&previewTab=%7B%22console%22%3Atrue%2C%22flowchart%22%3Afalse%2C%22hidden%22%3Atrue%7D&language=esjs&hideOptions=false" open-url="https://editor.esjs.dev/" />
Reference
Properties
Name | Type | Default | Description |
---|---|---|---|
hidePreview | Boolean | true | Muestra/oculta la previsualización |
hideConsole | Boolean | false | Muestra/oculta la consola |
hideOptions | Boolean | true | Muestra/oculta las opciones |
hideEditor | Boolean | false | Muestra/oculta el editor |
hideSlot | Boolean | false | Muestra/oculta el slot |
hideOpenButton | Boolean | false | Muestra/oculta el botón para abrir el editor en una nueva pestaña |
src | String | URL del Editor EsJS como entrada | |
openUrl | String | URL a la que se redirige al hacer clic en el botón de abrir |
Slots
Name | Parameters | Description |
---|---|---|
default | Éste slot debe contener código en Markdown, el cual será utilizado como código de entrada |