My admin theme is using seven and my default theme is newspro theme. I have linked the ckeditor to use newspro theme css. However, the content inside ckeditor does not give the same styling of what I have published. How can I make the styling in ckeditor same as newspro theme css?

Comments

colorMe’s picture

Assigned: colorMe » Unassigned
dczepierga’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

Pls try last DEV version of CKEditor module, few days ago I fix problem with loading styles from themes: #1231130: The "Use theme style" setting now always uses the "seven" theme (admin menu theme)

After update and check this, pls write does help or not.

Greetings

colorMe’s picture

Version: 7.x-1.2 » 7.x-1.x-dev

Hi!

I have installed 7.x-1.x-dev version and unfortunately the result is still same as 7.x-1.2 version that I have installed earlier.

For example :

When I use

tag in the editor the text is bold.

My theme css is using
#content h4, #main-content h4{
margin:0 0 25px;
font:15px Verdana, Geneva, Arial, Helvetica, sans-serif;
}

It is not detecting my theme css when i inspect

element on the editor.

Kindly assist.

Thanks.

nmc’s picture

I think I'm having a similar problem with ckeditor v7.x-1.3. Upon creation of a page, the styles show up in the ckeditor box as they should be and is saved and displayed correctly.

But when I try to edit the text again, the styles are no longer displayed in the ckeditor composition text box. Upon inspection of the html source, the correct code is still there and is still displayed correctly when saved. But the wysiwyg is misleading because it's not wysiwyg. The text that appears in the ckeditor box is not styled according to the CSS rules.

nmc’s picture

Status: Postponed (maintainer needs more info) » Active

I just realized why this is happening. I have in my ckeditor.styles.js:

{ name : 'Heading 2', element : 'h2',
     styles : { 'color' : '#890F0B', 'font-family' : 'Neuton,serif', 'font-weight' : 'bold', 'margin-bottom' : '0.5em' } }

But my text format filter strips all inline styles after the initial save.

In actuality, the styling comes from my css as:

#main-content h2{
        color: #890f0b;
        font-family: 'Neuton', serif;
        font-weight: bold;
        margin-bottom: 0.5em;
}

I added the styles : { 'color' : '#890F0B', 'font-family' : 'Neuton,serif', 'font-weight' : 'bold', 'margin-bottom' : '0.5em' } so that users can preview the resulting text styling in the Styles drop down. Without this line, the styles drop down only shows the default H2 styling.

Could we get ckeditor to recognize the theme's CSS styling so that it can be displayed in the composition text area?

nmc’s picture

Status: Active » Closed (fixed)

Issues fixed by following: http://drupal.ckeditor.com/tricks