-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [Improve] Configuration of TinyMCE to support additional style and …
…contents (#249) * ✨ [Improve] Configuration of TinyMCE to support additional style and contents Refs: Georiviere/Georiviere-public#64 * Update georiviere/flatpages/static/js/tinymce.js * Update georiviere/flatpages/static/js/tinymce.js
- Loading branch information
1 parent
e0f5579
commit ccabc78
Showing
2 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,67 @@ | ||
tinyMCE.init({ | ||
selector: ".tiny-class", | ||
editor_selector : ".tiny-class", | ||
height: 600, | ||
relative_urls : false, | ||
remove_script_host : false, | ||
plugins:["advlist autolink lists link image charmap print preview anchor"], | ||
toolbar: 'undo redo | blocks | bold italic | alignleft aligncenter alignright | indent outdent | link image ', | ||
}); | ||
plugins: [ | ||
'autolink lists link image', | ||
'media table paste wordcount', | ||
'visualblocks preview anchor' | ||
], | ||
menubar: false, | ||
image_caption: true, | ||
toolbar: 'undo redo | styleselect | blockquote | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image media | indent outdent | visualblocks', | ||
formats: { | ||
informationFormat: { | ||
block: 'div', classes: 'information' | ||
} | ||
}, | ||
style_formats: [ | ||
{ title: 'Headings', items: [ | ||
{title: 'Headings 2', format: 'h2'}, | ||
{title: 'Headings 3', format: 'h3'}, | ||
{title: 'Headings 4', format: 'h4'}, | ||
{title: 'Headings 5', format: 'h5'}, | ||
{title: 'Headings 6', format: 'h6'} | ||
]}, | ||
{title: 'Inline', items: [ | ||
{title: 'Bold', format: 'bold'}, | ||
{title: 'Italic', format: 'italic'}, | ||
{title: 'Underline', format: 'underline'}, | ||
{title: 'Strikethrough', format: 'strikethrough'}, | ||
]}, | ||
{title: 'Blocks', items: [ | ||
{title: 'Paragraph', format: 'p'}, | ||
{title: 'Blockquote', format: 'blockquote'}, | ||
{title: 'Information', format: 'informationFormat'}, | ||
]}, | ||
{title: 'Alignment', items: [ | ||
{title: 'Left', format: 'alignleft'}, | ||
{title: 'Center', format: 'aligncenter'}, | ||
{title: 'Right', format: 'alignright'}, | ||
{title: 'Justify', format: 'alignjustify'} | ||
]} | ||
], | ||
forced_root_block : false, | ||
default_font_stack: [ '-apple-system', 'Helvetica', 'Arial', 'sans-serif' ], | ||
content_style: ` | ||
h1,h2,h3 { | ||
clear:both; | ||
} | ||
.align-left { | ||
float: left; | ||
margin-right: 1rem; | ||
margin-bottom: 1rem; | ||
} | ||
.align-right { | ||
float: right; | ||
margin-left: 1rem; | ||
margin-bottom: 1rem; | ||
} | ||
.information { | ||
clear: both; | ||
padding: 1rem; | ||
background: lightgray; | ||
}` | ||
}); |