Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add text-align buttons to toolbar in TinyMCE 4.x?

This link: http://www.tinymce.com/wiki.php/TinyMCE3x:%22For_Dummies%22 shows under the headline "Custom Advanced TinyMCE wysiwyg Editor" in the second window behind "theme_advanced_buttons" the names of the buttons you can add to your toolbar. It's a bit different in version 4.x but it works the following way:

$('#my_textarea').tinymce({
    plugins: 'link,code,preview,autolink',             
    height: 350,
    width: 750,
    toolbar: "undo redo | styleselect | bold italic | justifyleft justifycenter justifyright | bullist numlist | link image | preview code"
});

Except the justifyleft justifycenter justifyright buttons everything works perfect. So how to find out the right button names for these buttons?

like image 240
user2718671 Avatar asked Apr 23 '14 13:04

user2718671


People also ask

How do you add CSS to TinyMCE editor?

These content CSS files can be enabled in the editor using the content_css configuration option. Copied! These content CSS files can also be used as a template for creating a custom content CSS file for the editor. For the CSS files, see: tinymce-dist GitHub Repository - Content CSS files.


1 Answers

Found the answer here: http://www.tinymce.com/tryit/full.php

alignleft aligncenter alignright alignjustify

works

like image 105
user2718671 Avatar answered Oct 02 '22 13:10

user2718671