Hello.
I am currently working on a news site, where we got rid of outdated Fckeditor and implemented latest CKeditor a couple of days ago. We are now facing a problem, which I'm not sure is a bug or a feature of this editor.
The editors who post articles from the backend first write the article in notepad in the following format:
<p>this is paragraph 1</p> <p> </p> <p>this is paragraph 2</p> <p> </p> <p>this is paragraph 3</p>
Re: BUG? CKeditor adds new line and tab space after P tag
I was able to overcome this issue by using the following code when I called an instance of CK Editor
HTH
Mark
Re: BUG? CKeditor adds new line and tab space after P tag
I am instantiating the CKEditor with PHP and NOT WITH JAVASCRIPT, but do have a customConfig.js file running.
Thanks,
-DK
Re: BUG? CKeditor adds new line and tab space after P tag
Based on the instructions in the developer guide, under Step 2: Creating an Editor Instance I call the editor instance with the following code
(Sorry for the lack of indentation if you like that type of thing)
This gives me 99% control over the issue that you (and hundreds of others if this forum is anything to go by) are suffering from. The only thing it doesn't allow me to to is specify a break in-between </p> and <p> which makes the source code slightly easier to read, but you can't have everything...
You have to specifiy this for each html element you are using, so li,ul,h1,h2 etc will all need similar code.
Hope this helps you (and anyone else who finds this while searching for a solution to their woes...)
Re: BUG? CKeditor adds new line and tab space after P tag
Re: BUG? CKeditor adds new line and tab space after P tag
BRILLIANT!! Thank you so much, this has bugged me forever and now CKEditor is almost perfect; is there a way to apply the rules to every (block?) HTML element without individually specifying them? A catch all perhaps along the lines of:
Better late than never.
I have just switched from another javascript editor to CKEDITOR and I love it. I find the jquery documentation a little bit lacking though. I came across the same problem as the original poster and am using the jquery adaptor to initiate the CKEditor instances. (I have 2 on the page)
I figured out that if I initialise CKEditor in the following way it works well. (I have only tested on a few tags so far, but I am using a stripped down toolbar with only a couple of options available to the user, so I don't need many tags checked in the final output)
$('#description').ckeditor( function() {
this.on('instanceReady', function(ev) {
var tags = ['p', 'ol', 'ul', 'li']; // etc.
for (var key in tags) {
ev.editor.dataProcessor.writer.setRules(tags[key],
{
indent : false,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
});
}
});
}, {
width: 600,
toolbarCanCollapse: false,
resize_enabled: false,
removePlugins: 'elementspath',
toolbar:
[
['Bold', 'Italic', 'Underline', '-', 'BulletedList', 'NumberedList']
]
})
problem CKeditor adds /br after p automatically after update
Hello all,
i am new to ckeditor and code scripting, so be gentle...
i am developping a simple website for a book-to-be published
you can see the website here
as you can see, i have a simple text with small title and main text that i edit through the text area of ckeditor
it seems that after updating the page / or after changing the language tab to edit the text in another language,
ckeditor automatically puts a /br after each /p and this way messes with the text breaks.
i read this article in the forum but i am not sure how to do it:
can you guide me more specifically please?
thanks for your support,
have a nice day peoples!
:)
i don't no
i don't no
Type is null or not an object - in CKEditor
Version : CKEditor 4.4.1
Frequently facing the issue while copy and paste the outside content(which does not have any special char). And also when pressing the enter key inside the ckeditor the same issue raised again.
FTA, Screenshots.
Any suggestion appreciated.
Attachments: