Create inline custom styles to:
This page is for the original editor experience. You can add Custom Styles to the Enhanced Editor from the Dashboard.
CKEDITOR.editorConfig = function( config ) {
config.stylesSet.push({ name : 'Custom div 1', element : 'div', wrap:true, attributes : { 'class' : 'custom1', 'title' :'Custom_Class1' } });
config.stylesSet.push({ name : 'Custom span 2', element : 'span', wrap:false, attributes : { 'class' : 'custom2', 'title' :'Custom_Class2' } });
};
To remove the custom style from the text, highlight the text and select the custom style again or select a different style.
The following is a pre-built custom style that you can use or modify. It will add a gold "Warning" box that looks like this:
.png?revision=1)
Part 1: Under Site tools > Control panel > System Settings > Editor, in the Set editor configuration field, add the following code, then save.
CKEDITOR.editorConfig = function( config ) {
config.stylesSet.push({ name : 'Warning', element : 'div', wrap:true, attributes : { 'class' : 'mt-warning-container', 'title' :'Warning' } });
};
Part 2:
If your site CSS is stored in the Dashboard:
If your site CSS is stored in the Control Panel:
.mt-warning-container{
align-items: flex-start;
background-color: @background;
border: 1px solid #d9d9d9;
border-radius: .25em;
-webkit-box-shadow: 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2);
box-shadow: 0 .55em .7em .05em rgba(0,0,0,.14), 0 .15em 1em .1em rgba(0,0,0,.12), 0 .35em 0.4em -.25em rgba(0,0,0,.2);
color: #333;
display: flex;
.default-font-declaration(normal; 100%; 1.2; @default-font-family);
margin: 2.25em 1em;
padding: 1em;
}
@media all and (max-width: 37.5em) {
.mt-warning-container,
.mt-note-container {
margin: 2.25em 1%;
}
}
.mt-warning-container:before{
flex: 0 0 auto;
.icon-font-declaration(normal; 175%; 1; @icon-font-family);
margin: 0 .5em 0 0;
white-space: nowrap;
}
.mt-warning-container:before {
color: #f6b221; gold
content: '\e6f5';
}
.mt-warning-container p{
color: #333;
line-height: 1.7;
margin: 0;
}