Hi
I'm using the ckeditor 2.x for a website in a custom made css
this webiste has their own css style defintions for divs and span text
To get a more accurate view of what i'm getting in the ckeditor, i modified in fckconfig.js
this:
(the route to my css used in the frontend)
well, i have the next issue:
I want to keep the code that i get from the editor, clean as much as possible, for example, in my css file i have the next class
I also defined this style in the
fckconfig,js
well, when i used this style in the editor, the html code that i get is:
how i could make, that the editor give me the code in this way?
as you can see, this is more clean, and as the css style is defined in frontend and in the backend, the user will be seing a very accurate result of how the content would look in the frontend
I hope you could help me
I'm using the ckeditor 2.x for a website in a custom made css
this webiste has their own css style defintions for divs and span text
To get a more accurate view of what i'm getting in the ckeditor, i modified in fckconfig.js
this:
FCKConfig.EditorAreaCSS ='/2011/estilacho.css' ;
(the route to my css used in the frontend)
well, i have the next issue:
I want to keep the code that i get from the editor, clean as much as possible, for example, in my css file i have the next class
.title { font-family: Helvetica; font-size: 13px; }
I also defined this style in the
fckconfig,js
FCKConfig.CustomStyles = { 'title' : { Element : 'span', Styles : { 'font-family' : 'Helvetica' , 'font-size' : '13px' } } };
well, when i used this style in the editor, the html code that i get is:
<span [b]style="font-family: Helvetica; font-size: 13px; "[/b]>test</span>
how i could make, that the editor give me the code in this way?
<span [b]style="title"[/b]>test</span>
as you can see, this is more clean, and as the css style is defined in frontend and in the backend, the user will be seing a very accurate result of how the content would look in the frontend
I hope you could help me
Re: how to get css styles with referenced by name?
With regards to your question:
isn't it better to generate <span class="title"> instead?
Re: how to get css styles with referenced by name?
thanks, and I'll let you know when finished
Re: how to get css styles with referenced by name?
I am guessing that your customizations might involve a lot more changes than just configuration settings, but in any case maybe this article and the linked mapping table might make your upgrade a bit easier. Good luck!
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!