Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Editor adding a custom emoticon and the applying a background color Options
katie
Posted: Tuesday, February 14, 2017 5:24:49 AM
Rank: Member
Groups: Member

Joined: 12/7/2007
Posts: 20
I have added some custom emoticons to the editor, they are transparent pngs. I would like to be able to put a background color on each one, and was trying to use the text highlighter to put a background colour on the transparent png, but this doesn't work. Is there any way of doing this?

Thank you.
eo_support
Posted: Tuesday, February 14, 2017 8:54:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,074
Hi,

I am not sure what you meant by using text highlighter to put a background color on the transparent pngs. What's the result HTML you want the editor to produce?

Thanks!
katie
Posted: Tuesday, February 14, 2017 8:57:24 AM
Rank: Member
Groups: Member

Joined: 12/7/2007
Posts: 20
Ideally I would like for it to add a class to an image to give a background colour. Or a style.
<img src="/eo_web.ashx?id=emoticon&amp;i=bottlebrush,symbols" alt="BottleBrush" class="bgRed" />

Thank you.
eo_support
Posted: Tuesday, February 14, 2017 9:45:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,074
Hi,

You can try to create a CSS rule with CSS wildcard selector and then apply it to the Editor through this property:

https://www.essentialobjects.com/doc/eo.web.editor.textareacssfile.aspx

Inside the file you can have CSS rule like this:

Code: C#
img[src*="id=emoticon"]
{
    background-color: red;
}


This would match all img tags whose src property contains "id=emoticon" and apply whatever styles you specify in the rule.

Thanks!
katie
Posted: Tuesday, February 14, 2017 9:51:43 AM
Rank: Member
Groups: Member

Joined: 12/7/2007
Posts: 20
How would I set the id on the emoticon that is chosen? I also need the user to be able to select different colours?

Thank you
eo_support
Posted: Tuesday, February 14, 2017 9:55:21 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,074
You won't be able to do that. :(


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.