I want to make a CSS/HTML image gallery. I am trying to emulate the gallery demonstrated on this website:

http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/

When I paste the two peices of code (first CSS, then HTML), and save it works! BUT, if you further re-edit the page and subsequently save again, the CSS code is chopped out, and the HTML code is compressed.

How can I tell CKeditor to leave my code alone?

I want to be able to assign unique CSS styles on a single node/page basis.

Cheers.

Comments

ademskiadov’s picture

Assigned: Unassigned » ademskiadov

I guess my request is simple.. how can I stop CKeditor from modifying my HTML source code, for the better or worse?

 I have tried searching for some resource/documentation that disables HTML output/modification compared to what you actually write as source code.. and failed miserably.

I have turned off all filters. I also tried set entities to false in both the javascript options in advanced ckeditor options. I also tried using a different, unformatted input filter type.

I suspect it may have something to do with HTML parsing, which probably is there to cut out harmful scripts etc. Since I am running locally, I do not particularly need this security. 

I found something about Output Formatting, and the CKeditor HTML Writer (which I completely don't get) over here:

 http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Output_Formatting

 Please advise. Thanks.

ademskiadov’s picture

Assigned: ademskiadov » Unassigned
mephir’s picture

Assigned: ademskiadov » Unassigned

Check Security filters in profile maybe someone remove style definition.
If it don't help apart try use this configuration variable http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.prot... .
Yuu should add to ckeditor.config.js, something like that:
config.protectedSource.push( /<style.+>[\S\s]*<\/style>/gi );

jackhutton’s picture

Title: CKeditor chopping off CSS code » Plans for a CKFinder module or -- how to integrate the CKfinder into a drupal install for us non-hyper-technical types.

thanks for the reworked FCKeditor.. (and for changing the name - it was kind of obsence..through no fault of yours...) but,
now that i've loaded it, I assume the CKfinder file browser would work best in this environment, but there is no module available for the CKfinder.. which would mean that I'd have to write a hook of some sort - beyond me at the present.

How do I integrate this with the CKeditor install..? I did refer to the documentation on your site, but got tangled up in it all.

thanks

this is misplaced here - and should probably be a separate item under 'feature request'..)

mephir’s picture

Title: Plans for a CKFinder module or -- how to integrate the CKfinder into a drupal install for us non-hyper-technical types. » CKeditor chopping off CSS code

@eggonbeagle it shouldn't be here, new one issue is right place for feature request.

mephir’s picture

Status: Active » Fixed

@ademskiadov: If you have any lack of clarity about issue, feel free to reopen it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.