So I have a pretty complicated setup. Currently I use an old modified fckeditor (for Wordpress) to post articles on my blog containing bridge diagrams (http://www.vikingsinspace.nl). It's probably crummy css to generate these diagrams, but it's all I have.
I try to move to ckeditor-for-wordpress 3.5.2.
Here's some sample css:
.diagram .header { font-size: smaller; margin-left: 0.25em; margin-right: 0.25em; margin-bottom: 0; margin-top: auto; padding: 0.25em; border: 0.1em outset; width: 6.5em; float: left; background: #FFFFFF; } .diagram { width: 25em; } .diagram .hand { width: 9em; } .diagram .south , .diagram .north { margin-left: 8em; } .diagram .north { padding-bottom: 1ex; } .diagram .south { clear: both; padding-top: 1ex; } .diagram .west { float: left; clear: left; } .diagram .east { float:right; } .hand .seatname { margin-left: 1em; font-size: smaller; font-style: italic; }
Re: Viewing a custom class in the editor area
In the CKEditor - Advanced options screen:
"Use theme css", leave CSS path empty, cleared the cache and suddenly the diagrams appeared the way they should in the editor-area.
Set the output formatting to your liking with break lines and indentation options.
I manually edited these files:
ckeditor.config.js
- config.enterMode = CKEDITOR.ENTER_BR;
- config.templates_replaceContent = false;
ckeditor.templates.js
- added my templates for bridge diagrams
Re: Viewing a custom class in the editor area
So I added config.enterMode = CKEDITOR.ENTER_BR; to my ckeditor.config.js, but when I save an article still all the linebreaks get replaced by <p> tags. I understand it's semantically desired, and I will consider using it. But where can I find the option to disable this for now? What config-setting do I have to flag?
Thanks.
Re: Viewing a custom class in the editor area
If it's every linebreak then it's probably some other external code.
If it's just when you press enter, then clear your cache, browsers are a little stupid sometimes.
Re: Viewing a custom class in the editor area
If I press Enter (and some txt) in wysiwyg mode, the source looks like:
All good. But when I Save Draft (Wordpress functionality), and then review the source, it looks like this:
I have compared this to what happens in my old FCKEditor plugin, but absolutely no replacement of <br />'s.
To me it looks like CKEditor parses/formats stuff before it gets committed to the db. But I might be wrong here. Any ideas?
Re: Viewing a custom class in the editor area
Re: Viewing a custom class in the editor area
All I know is when I save my work it seems as if things get processed/parsed before committing. And thus <br /> tags get replaced by <p> tags.
Re: Viewing a custom class in the editor area