311/Editor TinyMCE

De MoodleDocs
note icon.png Existe documentación diferente para varias versiones de Moodle: Esta documentación sobre el antiguo editor TinyMCE que se usaba en Moodle 2.x y 3.x. La documentación para el nuevo editor TinyMCE para Moodle 4.1 y más recientes está en Editor TinyMCE y Editor TinyMCE (antiguo).


Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

Nota: La documentación para Moodle 4.1 y más recientes se encuentra en Editor TinyMCE (antiguo).


Moodle 2.7

El Editor de texto (al que a veces se refiere como el 'editor HTML' o antiguamente 'TinyMCE') tiene muchos íconos para asistirle al usuario el escribir contenido. Muchos de estos íconos y funciones deberían de resultarle famimiar a cualquiera que use un procesador de texto. Algunos ejemplos de donde verá Usted el editor de texto incluyen a: Al editar encabezados de secciones, descripción de una actividad, escribir una respuesta dentro de una pregunta de un examen o al editar el contenido de muchos bloques.

Notas: TinyMCE fue el Editor de texto por defecto para Moodle 2.6 y versiones anteriores, pero de Moodle 2.7 en adelante, Atto será el editor HTML por defecto para las nuevas instalaciones.

  • Atto es un Editor de texto en JavaScript que fue construido especificamente para Moodle.
  • Usted puede cambiar su Editor de texto por defecto (regresar a tener TinyMCE) al ir a ' Administración > Administración del sitio > Plugins > Editores de texto > Gestionar editores ' y cambiar el orden de prioridad.
  • También es posible deshabilitar el editor TinyMCE editor y usar solamente un editor de texto simple desde Administración > Administración del sitio > Plugins > Editores de texto > Gestionar editores.
  • Un usuario individual puede seleccionar un editor en su perfil desde Administración > Configuración de Mi perfil > Editar perfil.
  • En Moodle 2.9 un usuario individual puede seleccionar un editor desde el menú del usuario arriba a la derecha > Preferencias > Preferencias del editor

Atto

27Atto editor.png

TinyMCE

27TinyMCE editor with CLOZE plugin working OK.png

Seleccionar TinyMCE en lugar de Atto como Editor de texto por defecto en Moodle 2.7+

800px-27available editors default config click here.png

27available editors Moving Atto down makes TinyMCE top.png


Colapsar y expandir el editor

Moodle 2.6


El editor TinyMCE aparece primero con solamente una fila de botones. Al elegir el ícono de arriba a la izquierda se expanderá a tres filas.

Vista colapsada
Vista expandida

Botones de barra de herramientas

Para aquellos que no están famliarizados con la barra de herramientas, aquí están los botones agrupados en sus filas. recuerde que el administrador del sitio puede editar o proporcionar botones adicionales.

Fila 1

26tinymcerow1.png
1:Expander 2.Formato 3.Negritas 4.Cursivas
5.Lista con viñetas 6.Lista numerada 7.Añadir enlace 8.Des-enlazar
9.Detener auto-enlazado 10.Añadir imagen 11.Añadir emoticón 12.Añadir medio
13.Gestionar archivos incrustados

Fila 2

26tinymcerow2.png
1:Deshacer 2.Rehacer 3.Subrayado 4.Tachado
5.Subíndice 6.Superíndice 7.Alinear izquierda 8.Alinear centro
9.Alinear derecha 10.Disminuir tabulador 11.Aumentar tabulador 12.Color del texto
13.Color del fondo 14.De Izquierda a Derecha 15.De Derecha a Izquierda 16.Espacio inseparable
17.Caracter especial 18.Tabla

Fila 3

26tinymcerow3.png
1:Familia del Tipo de letra 2.Tamaño del Tipo de letra 3.Editar HTML 4.Buscar
5.Buscar/remplazar 6.Limpiar código sucio 7.Remover formato 8.Pegar texto simple
9.Pegar MS Word 10.Alternar pantalla completa

Selectores de color

  • 26colourpickers.png

Hay cuatro niveles para la selección del color del tipo de letra o del color del fondo,

  • Una matriz de colores para selección rápida de 5 por 8
  • "Más colores" que enlaza a las pestañas del selector de colores, Paleta y Nombrada (con nombre)

Insertar tabla

Para añadir bordes a una tabla

Los bordes de la celda son cruciales para ayudarle a los lectores a seguir las hileras a lo ancho de la pantalla. Si aun no están mostrándose Usted puede añadirlos como sigue:

  1. En la página del Wiki que contienbe su tabla, elija la pestaña para Editar
  2. Cuidadosamente seleccione todas las celdas de la tabla
  3. Después haga Click (Macs: Command+click o Ctrl+Click) sobre cualquier parte de su selección para obtener un menú contextual; desde éste seleccione Celda > Propiedades de Celda de Tabla; y entonces se cargará la caja de diálogo de propiedades de celda.
  4. Elija la pestaña de Avanzadas, configure el Color del Fondo a negro (por ejemplo), después elija Aplicar y luego elija Actualizar.
  5. Elija Guardar; se cargará entonces la página del Wiki que contiene su tabla, mostrando sus bordes.

Configuraciones de Administración del Sitio

Gestionar editores

Un administrador del sitio puede habilitar / deshabilitar editores de texto en Configuraciones > Administración del sitio > Plugins > Editores de Texto > Gestionar editores . Por defecto, están habilitados los editores HTML TinyMCE y el de texto simple.

Configuraciones del editor TinyMCE

El editor HTML TinyMCE tiene su propia página de ajustes en Administración > Administración del sitio > Plugins > Editores de texto > Editor HTML TinyMCE > Configuraciones generales con las siguientes opciones:

Plugins

  • Botones para ecuaciones, emoticones,imágenes, medio, enlace automático y revisor de ortografía antiguopueden habilitarse, deshabilitarse o desinstalarse aquí al elegir su ojo respectivo.
  • Adicionalmente, los botones de ecuación, emoticón y revisor de ortografía tienen enlaces hacia sus pantallas de Ajustes.
"The TinyMCE editor plugins screen"
La pantalla de Plugins del editor TinyMCE
Gestionar archivos incrustados

Este plugin le permite a los usuarios el añadir, eliminar o anular archivos incrustados dentro del área de texto actual, por ejemplo, en una etiqueta o en un resumen del tópico. (Complementa al Repositorio archivos incrustados)

The Manage files button
Managing embedded files from within TinyMCE
Insertar ecuación

Accessed from Administration>Site administration>Plugins>Text editors>TinyMCE HTML editor>Edit equation, this allows you to enable or disable the TeX filter in the editor context and thereby display the Dragmath button. If you have a global custom TeX filter, then disable this setting.

Insertar emoticón

Accessed from Administration>Site administration>Plugins>Text editors>TinyMCE HTML editor>Insert emoticon, this allows you to enable or disable the emoticon filter in the editor context and thereby display the emoticon button.

Revisor antiguo de ortografía

The legacy spell checker is visible in IE9 and lower only, but not in other browsers. If you want to disable it and and rely on browser spell checker functionality instead, you can do this by disabling the legacy spellchecker plugin by clicking its eye in Administration > Site administration > Plugins > Text editors > TinyMCE HTML editor > General settings

To spell-check via your browser, type your word (which if incorrectly spelt will have red lines under it) and press right click + CTRL

Right-click+CTRL for browser spellcheck


You can select a different spell engine from Administration> Site administration > Plugins > Text editors > TinyMCE HTML editor>Check spelling


Choosing a different spell engine

According to: http://php.net/manual/en/book.pspell.php

"As of php 5.3. Pspell is no longer supported/bundled. Instead you can use the enchant which is bundled by default in 5.3."

If PSpell is selected then aspell 0.50 or later must be installed on your server and the path to aspell set in Administration > Site administration > Server > System Paths.

Personalizar la barra de herramientas del editor

An administrator can remove or add buttons to the TinyMCE editor toolbar by altering the Editor toolbar box in Administration>Site administration>Plugins>Text editors>TinyMCE HTML editor>General settings as demonstrated in the screencast Customise the text editor in 2.4

The Editor toolbar box
Example of simpler toolbar with added horizontal rule button
An "insert time" button has been added


Lista de Tipos de letra disponibles

In addition to the default fonts, a site administrator can add extra fonts by typing their name and string in the box in Administration > Site administration > Plugins > Text editors > TinyMCE HTML editor>General settings as demonstrated in the screencast How to add extra fonts.

Example of custom font

Configuración personalizada

A setting in Administration>Site administration>Plugins>Text editors>TinyMCE HTML editor>General settings provides a box in which an administrator can apply custom formats. See MDL-37186 for more details with examples, and see also the TinyMCE configuration page

Example 1:Toolbar at the bottom
Example 2: Custom styles
  • Example: Moving the toolbar to the bottom:

Add the following:

{"theme_advanced_toolbar_location" : "bottom"}
  • Example: Adding your own custom styles.

(This might be useful for example if you want a "house style" for important notes, key points or similar) In the editor toolbar, enter "styleselect" and then in the custom box add the following code, changing it to suit your purposes:

{"style_formats" : [
 {"title" : "Bold text", "inline" : "b"},
 {"title" : "Red text", "inline" : "span", "styles" : {"color" : "#ff0000"}},
 {"title" : "Red header", "block" : "h1", "styles" : {"color" : "#ff0000"}} ]}

The following will let you use bootstrap CSS classes if you use a bootstrap based theme:

   {"style_formats" : [
       {"title" : "Well", "block" : "div", "classes" : "well"},
       {"title" : "Label", "inline" : "span", "classes" : "label"},
       {"title" : "Label - success", "inline" : "span", "classes" : "label label-success"},
       {"title" : "Label - warning", "inline" : "span", "classes" : "label label-warning"},
       {"title" : "Label - important", "inline" : "span", "classes" : "label label-important"},
       {"title" : "Label - info", "inline" : "span", "classes" : "label label-info"},
       {"title" : "Label - inverse", "inline" : "span", "classes" : "label label-inverse"},
       {"title" : "Button", "inline" : "a", "classes" : "btn btn"},
       {"title" : "Button - primary", "inline" : "a", "classes" : "btn btn-primary"},
       {"title" : "Button - info", "inline" : "a", "classes" : "btn btn-info"},
       {"title" : "Button - success", "inline" : "a", "classes" : "btn btn-success"},
       {"title" : "Button - warning", "inline" : "a", "classes" : "btn btn-warning"},
       {"title" : "Button - danger", "inline" : "a", "classes" : "btn btn-danger"},
       {"title" : "Button - inverse", "inline" : "a", "classes" : "btn btn-inverse"}
   ]}
  • Example: Enabling copy of rich content with styles from MS Word (tm) and paste into TinyMCE without removing important styles:
{"paste_retain_style_properties" : "margin, padding, width, height, font-size, 
  font-weight, font-family, color, text-align, ul, ol, li, 
  text-decoration, border, background, float, display"}

If you have access to the /theme folder of your Moodle site, you can always add additional styles to the TinyMCE editor by following these steps:

-Create an 'editor.css' file and add all the additional styles (classes, etc) that you plan to use to that document. For instance, I will be using the following additional class:

.keypoint {

               background-color: #F1F7F9;
               background-repeat: no-repeat;
               padding-top: 1%;
               padding-right: 5%;
               padding-bottom: 2%;
               padding-left: 5%;
               background-size: auto;
               font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
               font-style: oblique;
               font-weight: bold;

}

-Copy the file 'editor.css' in the following folder: /moodle/theme/your Moodle theme/style

where 'your Moodle theme' is the theme that you have selected for your Moodle site.

-Using the Moodle adminstration menu, go to ' SITE ADMINISTRATION / ► PLUGINS / ► TEXT EDITORS / ► TINYMCE HTML EDITOR / ► GENERAL SETTINGS' and the box 'Editor toolbar', add the following text in the first line:
fontselect,fontsizeselect,formatselect,styleselect,|,undo,redo,|,search,replace,|,fullscreen

That will create a new 'Styles' box in the interface of the TinyMCE editor that will display all the css elements defined in the file editor.css:

|

Example of adding additional styles

|}


Plugins adicionales para TinyMCE

En Moodle 2.4 y posteriores, el editor TinyMCE se puede extender y remplazar por nuevos plugins dsponibles en el Moodle plugins database. Algunos de estos plugins son:


Screencasts

TinyMCE text editor improvements.

Vea también