-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply styles for WYSIWYG content #64
Merged
Merged
Conversation
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
a536571
to
56a62ed
Compare
Compatibility with TinyMCE4 (the only change is the removal of the tinymce.init({
selector: 'textarea',
height: 800,
plugins: [
'autolink lists link image',
'media mediaembed',
'media table paste imagetools wordcount',
'visualblocks'
],
menubar: false,
image_caption: true,
toolbar: 'undo redo | styleselect | blockquote | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image media | 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;
}
`
}); |
ddb858f
to
4efd006
Compare
babastienne
added a commit
to Georiviere/Georiviere-admin
that referenced
this pull request
Apr 23, 2024
babastienne
added a commit
to Georiviere/Georiviere-admin
that referenced
this pull request
Apr 23, 2024
submarcos
pushed a commit
to Georiviere/Georiviere-admin
that referenced
this pull request
Apr 24, 2024
…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
Bo-Duke
approved these changes
Apr 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ref #62
I'm keeping this PR as a draft until the ARG has updated its tinyMCE configuration.
I used tinyMCE version 5 (https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/5/tinymce.min.js)
And below is the tinyMCE configuration corresponding to this development: