<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs-old.ckeditor.com/index.php?action=history&amp;feed=atom&amp;title=CKEditor_3.x%2FHowto%2FCustom_Styles</id>
		<title>CKEditor 3.x/Howto/Custom Styles - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://docs-old.ckeditor.com/index.php?action=history&amp;feed=atom&amp;title=CKEditor_3.x%2FHowto%2FCustom_Styles"/>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Howto/Custom_Styles&amp;action=history"/>
		<updated>2026-05-19T14:27:43Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Howto/Custom_Styles&amp;diff=5907&amp;oldid=prev</id>
		<title>Anna: Article contents added</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Howto/Custom_Styles&amp;diff=5907&amp;oldid=prev"/>
				<updated>2011-03-09T05:53:01Z</updated>
		
		<summary type="html">&lt;p&gt;Article contents added&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{#CUSTOMTITLE:How Do I Add Custom Styles Based on CSS Classes?}}&lt;br /&gt;
Add a style definition as described in the [[CKEditor_3.x/Howto/Styles_List_Customization|How do I customize the Styles drop-down list?]] article and pass the class name in the &amp;lt;code&amp;gt;attributes&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;Do remember that since &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; is a resereved word in JavaScript, you need to place it in quotes.&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following example adds a &amp;lt;code&amp;gt;myClass&amp;lt;/code&amp;gt; class to an &amp;lt;code&amp;gt;img&amp;lt;/code&amp;gt; element. The image element will now be styled as defined in this CSS class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	name : 'Custom Image',&lt;br /&gt;
	element : 'img',&lt;br /&gt;
	attributes : { 'class' : 'myClass' }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more details on the definition format and best practices on how to customize the styles please refer to the [[CKEditor_3.x/Developers_Guide/Styles|Styles]] article from the [[CKEditor_3.x/Developers_Guide|Developer's Guide]].&lt;/div&gt;</summary>
		<author><name>Anna</name></author>	</entry>

	</feed>