Skip to content

Commit

Permalink
Convert /api/s-x folder to Markdown (es) (#9504)
Browse files Browse the repository at this point in the history
* api/s-x html cleanup

* api/s-x rename html to md

* api/s-x h2m replace

* api/s-x linting with 8181 .markdownlint-cli2.jsonc

* api/s-x drop the url title attributes

* api/s-x remove languages macro

* Apply suggestions from code review
  • Loading branch information
Graywolf9 committed Oct 25, 2022
1 parent 72e7586 commit 91e9792
Show file tree
Hide file tree
Showing 198 changed files with 9,103 additions and 10,490 deletions.
46 changes: 0 additions & 46 deletions files/es/web/api/selection/addrange/index.html

This file was deleted.

37 changes: 37 additions & 0 deletions files/es/web/api/selection/addrange/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: addRange
slug: Web/API/Selection/addRange
tags:
- páginas_a_traducir
translation_of: Web/API/Selection/addRange
---
{{ ApiRef("DOM") }}

### Resumen

Añade un objeto de rango a la selección.

### Sintaxis

```
sel.addRange(range)
```

### Parámetros

- _`range`_
- : Un objeto [range](es/DOM/range) que será añadido a la selección.

### Ejemplos

```
/* Seleccionar todos los elementos en NEGRITA en un documento HTML */
var strongs = document.getElementsByTagName("strong");
var s = window.getSelection();
if(s.rangeCount > 0) s.removeAllRanges();
for(var i = 0; i < strongs.length; i++) {
var range = document.createRange();
range.selectNode(strongs[i]);
s.addRange(range);
}
```
27 changes: 0 additions & 27 deletions files/es/web/api/selection/anchornode/index.html

This file was deleted.

22 changes: 22 additions & 0 deletions files/es/web/api/selection/anchornode/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: anchorNode
slug: Web/API/Selection/anchorNode
tags:
- páginas_a_traducir
translation_of: Web/API/Selection/anchorNode
---
{{ ApiRef("DOM") }}

### Resumen

Devuelve el nodo en el cual empieza la selección.

### Sintaxis

```
sel.anchorNode
```

### Notas

Un usuario puede hacer una selección de izquierda a derecha (en el orden del documento) o de derehca a izquierda (en el orden contrario del documento). El ancla es donde el usuario empezó la selección. Ésta puede ser visualizada manteniendo presionada la tecla **Shift** y presionando las flechas de movimiento del teclado. El ancla de la selección no se mueve, pero el foco de ésta (el otro "final" de la selección) sí se mueve.
27 changes: 0 additions & 27 deletions files/es/web/api/selection/anchoroffset/index.html

This file was deleted.

22 changes: 22 additions & 0 deletions files/es/web/api/selection/anchoroffset/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: anchorOffset
slug: Web/API/Selection/anchorOffset
tags:
- páginas_a_traducir
translation_of: Web/API/Selection/anchorOffset
---
{{ ApiRef("DOM") }}

### Resumen

Devuelve el número de caracteres en que el ancla de la selección es colocada dentro de [anchorNode](es/DOM/Selection/anchorNode).

### Sintaxis

```
sel.anchorOffset
```

### Notas

Este número está basado en cero. Si la selección empieza con el primer carácter en [anchorNode](es/DOM/Selection/anchorNode), el número devuelto será 0.
50 changes: 0 additions & 50 deletions files/es/web/api/selection/collapse/index.html

This file was deleted.

40 changes: 40 additions & 0 deletions files/es/web/api/selection/collapse/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: collapse
slug: Web/API/Selection/collapse
tags:
- páginas_a_traducir
translation_of: Web/API/Selection/collapse
---
{{ ApiRef("DOM") }}

### Resumen

Pliega la selección a un simple punto. El documento no es modificado. Si el contenido es enfocado y editable, el cursor parpadeará ahí.

### Sintaxis

```
sel.collapse(
parentNode,
offset);
```

### Parámetros

- _`parentNode`_
- : La localización del cursor estará dentro de este nodo.

<!---->

- _`offset`_
- : El cursor estará colocado éste número de caracteres desdel el comienzo del texto de
_`parentNode`'_
s text.

### Ejemplos

```
/* Colocar el cursor al principio del cuerpo de un documento HTML. */
var body = document.getElementsByTagName("body")[0];
window.getSelection().collapse(body,0);
```
27 changes: 0 additions & 27 deletions files/es/web/api/selection/collapsetoend/index.html

This file was deleted.

22 changes: 22 additions & 0 deletions files/es/web/api/selection/collapsetoend/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: collapseToEnd
slug: Web/API/Selection/collapseToEnd
tags:
- páginas_a_traducir
translation_of: Web/API/Selection/collapseToEnd
---
{{ ApiRef("DOM") }}

### Resumen

Traslada el ancla hasta el mismo punto del foco. El foco no se mueve. Si el contenido es enfocado y editable, el cursor parpadeará ahí.

### Sintaxis

```
sel.collapseToEnd()
```

### Parámetros

Ninguno.
29 changes: 0 additions & 29 deletions files/es/web/api/selection/collapsetostart/index.html

This file was deleted.

22 changes: 22 additions & 0 deletions files/es/web/api/selection/collapsetostart/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: collapseToStart
slug: Web/API/Selection/collapseToStart
tags:
- páginas_a_traducir
translation_of: Web/API/Selection/collapseToStart
---
{{ ApiRef("DOM") }}

### Resumen

Traslada el foco de la selección al mismo punto que el ancla. El ancla no se mueve. Si el contenido es enfocado y editable, el cursor parpadeará ahí.

### Sintaxis

```
sel.collapseToStart()
```

### Parámetros

Ninguno.
Loading

0 comments on commit 91e9792

Please sign in to comment.