Skip to content

Instantly share code, notes, and snippets.

@rainbowstudio
Created March 18, 2014 23:45
Show Gist options
  • Save rainbowstudio/9632484 to your computer and use it in GitHub Desktop.
Save rainbowstudio/9632484 to your computer and use it in GitHub Desktop.
Personnalisation de l'éditeur Tinymce de CMS. A coller dans le champ Extra configuration dans les paramètres de Tinymce.
style_formats : [
{title : 'Intro', block : 'div', wrapper : true, classes : 'intro'},
{title : 'Texte en orange', inline : 'span', classes : 'primary-color'},
],
formats: {
alignleft : [
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', styles : {textAlign : 'left'}, attributes : {"align" : ''}},
{selector : 'img', classes : 'alignleft'},
],
aligncenter : [
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', styles : {textAlign : 'center'}, attributes : {"align" : ''}},
{selector : 'img', classes : 'aligncenter'},
],
alignright : [
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', styles : {textAlign : 'right'}, attributes : {"align" : ''}},
{selector : 'img', classes : 'alignright'},
],
alignfull : [
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', styles : {textAlign : 'justify'}, attributes : {"align" : ''}},
{selector : 'img', classes : 'alignfull'},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment