8
I started using Ckeditor
And by initializing it, it comes in the following way:
And I would like it to come with a standard margin(I want it to look like A4)
How could I make him come already with a spacing?
8
I started using Ckeditor
And by initializing it, it comes in the following way:
And I would like it to come with a standard margin(I want it to look like A4)
How could I make him come already with a spacing?
5
The Ckeditor allows you to pass styles into the editor, if you are using version 3 you should use the following javascript code to add styles:
CKEDITOR.stylesSet.add( 'estilos-personalizados',
[
{ name : 'MarginA4', element : 'body', styles : { 'margin' : 'suamargin' } },
{ name : 'TamanhoDoTitulo' , element : 'h1', styles : { 'font-size' : 'tamanho da fonte' } },
]);
This creates a "Stylesheet", now you need to set this stylesheet in your editor, for this you use the following code:
config.stylesSet = 'estilos-personalizados';
Where estilos-personalizados
represents the style name created in stylesSet.add
There is also how to put this in external file as explained on this site: Developer Guides - Style
In version 4 of Ckeditor there is a new API that uses an a style object var style = new CKEDITOR.style( { element : 'body', attributes: { 'style' : 'margin: 10em' } } );
and this should be applied editor.applyStyle( style );
More information about this can be found in the documentation located at Dev#Styles
I hope this answers your question.
Browser other questions tagged jquery ckeditor
You are not signed in. Login or sign up in order to post.
I am trying to formulate an answer, but does the doubt come, the margin you want is internal (margin of the content of CK editor) or external? I was clear in my question?
– Samuel Diogo
@Samueldiogo margin interna
– Rod