Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Add class for Advanced Image Editor in EPiServer 8

Dan
Dan
Vote:
 

I was trying to add some class to Advanced Image Editor (in TinyMCE). But unable to do that. There were some explanation in the forum about doing it in lower versions of EPiServer (How to configure CSS classes for the image editor). But those were not working in  EPiServer 8

#140844
Nov 02, 2015 6:48
Vote:
 

Hi, have you tried adding something like this in the css file that you're loading in TinyMCE?

img.leftaligned {
    EditMenuName: 'Left aligned';
    float: left;
}

img.rightaligned {
    EditMenuName: 'Right aligned';
    float: right;
}
#140878
Nov 02, 2015 15:34
Dan
Vote:
 

Actually Mattias, I have tried that as well. The problem with that approach was, the defined style with "EditMenuName" is appearing in every style list of TinyMCE. But I just want it to appear only in Advanced Image Editor's class list

#140885
Nov 02, 2015 19:43
Vote:
 

Hi, Dan,

I don't think you can easily circumvent that. What might be a bit clearer for the editors is to group these with a headline, ex:

h2 {
    EditMenuTitle: Heading styles;
    EditMenuName: Header 2;
}
h3 {
    EditMenuName: Header 3;
}
h4 {
    EditMenuName: Header 4;
}
img.float-left {
    EditMenuTitle: Image styles;
    EditMenuName: Left align image;
}
img.float-right {
    EditMenuName: Right align image;
}

They can't be applied to anything other than an image anyways.

#141994
Nov 25, 2015 17:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.