Personaliza el menú de la barra de herramientas de tinymce 4.0.5 styleselect
Estoy tratando de personalizar el predeterminadostyleselect
menú de la barra de herramientas para que pueda agregarle un elemento de menú personalizado. La idea es colocar el tamaño de fuente comostyleselect
submenú
Inicialicé unTinyMCE 4.0.5
de la siguiente manera:
tinymce.init(
{
language_url : '/webobbywebapp/js/tiny_mce/language/es.js',
selector:'textarea',
plugins: "image, link, print",
toolbar: "styleselect | undo redo | removeformat | bold italic underline | aligncenter alignjustify | bullist numlist outdent indent | link | print | fontselect fontsizeselect",
menubar: false,
statusbar: true,
resize: true
});
Como no puedo encontrar la forma de personalizar el menú de selección de estilos predeterminado, también estoy tratando de crear un nuevo menú completo donde pueda agregar el control de tamaño de fuente. Pero no quiero mostrar ninguna barra de herramientas, quiero una sola barra de menú.
EDITAR: En este momento, estoy intentando modificar el menú de selección de estilos utilizando el siguiente código, pero las opciones de fuente y de opción de fuente aparecen deshabilitadas
,style_formats: [{ title: "Headers_", items: [{title: "Header 1",format: "h1"}, {title: "Header 2",format: "h2"}, {title: "Header 3",format: "h3"}, {title: "Header 4",format: "h4"}, {title: "Header 5",format: "h5"}, {title: "Header 6",format: "h6"}] }, {title: "_Inline",items: [{title: "Bold",icon: "bold",format: "bold"}, {title: "Italic",icon: "italic",format: "italic"}, {title: "_Underline",icon: "underline",format: "underline"}, {title: "Strikethrough",icon: "strikethrough",format: "strikethrough"}, {title: "Superscript",icon: "superscript",format: "superscript"}, {title: "Subscript",icon: "subscript",format: "subscript"}, {title: "Code",icon: "code",format: "code"}]}, {title: "_Blocks",items: [{title: "Paragraph",format: "p"}, {title: "Blockquote",format: "blockquote"}, {title: "Div",format: "div"}, {title: "Pre",format: "pre"}]}, {title: "_Alignment",items: [{title: "Left",icon: "alignleft",format: "alignleft"}, {title: "Center",icon: "aligncenter",format: "aligncenter"}, {title: "Right",icon: "alignright",format: "alignright"}, {title: "Justify",icon: "alignjustify",format: "alignjustify"}]}, {title: "Classes", items: 'fontsizeselect'}, {title: "dddClasses", items: 'fontselect' }]