Hello,
How can I set a background image in a custom style definition ?
Here is what I tried :
If I type "test" in the editor and select "My style" style, the background image is not displayed !
When I look at the source code I have :
which is not valid for the browser.
Thanks for your help.
I use CKeditor 3.5.1 with Firefox 3.6
How can I set a background image in a custom style definition ?
Here is what I tried :
CKEDITOR.addStylesSet( 'my_styles', [ { name : 'My style', element : 'div', styles : { 'background-image' : 'url(/myBg.png)' } } ]);
If I type "test" in the editor and select "My style" style, the background image is not displayed !
When I look at the source code I have :
<div style="background-image: url("/mybg.png");"> test</div>
which is not valid for the browser.
Thanks for your help.
I use CKeditor 3.5.1 with Firefox 3.6
Background image style definition
The easiest way to do this is to do it in the actual page your creating or editing.
Lets say the page name is test.html, then open the page using CKeditor, then click on "source" there you will see the codes for the page "test.html"
In the <head> tag, you must past the background image code of your choice , like
<head>
<style type="text/css">body
{
background-image:url("/images/back-image.gif");
}
</style>
</head>
<body>text here</body>
</html>
Use this example and you will get it correct.
thanks