Hi everyone,
I got stuck with the problem of <p> </p> tags being added to the whole text.(the start and end of the writing).
I can do shift+enter, but it only puts <br> inside the text and I can find no way to remove the <p> tags from the beginning of the input.
Please help or develop a function to make this part customizable.
Thanks a lot
Sina
I got stuck with the problem of <p> </p> tags being added to the whole text.(the start and end of the writing).
I can do shift+enter, but it only puts <br> inside the text and I can find no way to remove the <p> tags from the beginning of the input.
Please help or develop a function to make this part customizable.
Thanks a lot
Sina

Thanks!
I think the developers must know why they put the <p> </p> tags at the beginning and end of the codes! and surely there must be some way to prevent it from happening !!!
Please help guys ...
CKEDITOR.replace( 'editor1' ,
{
enterMode : Number(2),
is probably more correct - that also works.
it is set in the config.js file
/**
* Sets the behavior for the ENTER key. It also dictates other behaviour
* rules in the editor, like whether the <br> element is to be used
* as a paragraph separator when indenting text.
* The allowed values are the following constants, and their relative
* behavior:
* <ul>
* <li>{@link CKEDITOR.ENTER_P} (1): new <p> paragraphs are created;</li>
* <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with <br> elements;</li>
* <li>{@link CKEDITOR.ENTER_DIV} (3): new <div> blocks are created.</li>
* </ul>
* <strong>Note</strong>: It's recommended to use the
* {@link CKEDITOR.ENTER_P} value because of its semantic value and
* correctness. The editor is optimized for this value.
* @type Number
* @default {@link CKEDITOR.ENTER_P}
* @example
* // Not recommended.
* config.enterMode = CKEDITOR.ENTER_BR;
*/
enterMode : CKEDITOR.ENTER_P,
so you can override it with your own setting
Should I add enterMode : CKEDITOR.ENTER_BR to the end of config.js file?
And everything will get fine?
I did so, but its still not working.
Please tell me what exactly I should do.
Thank you
Sina
/*
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.uiColor = '#949AAA';
};
I added enterMode : CKEDITOR.ENTER_BR; , but it didn't work.
Please help guys.
thanks
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.uiColor = '#949AAA';
config.enterMode = CKEDITOR.ENTER_BR;
};
Setting Configurations http://docs.fckeditor.net/CKEditor_3.x/ ... igurations
Defining Configurations In-Page
CKEDITOR.replace( 'editor1',
{
toolbar : 'basic',
uiColor : '# 9AB8F3',
enterMode : CKEDITOR.ENTER_BR
});
Using the config.js File
CKEDITOR.editorConfig = function( config )
{
config.language = 'fr';
config.uiColor = '#AADC6E';
config.enterMode = CKEDITOR.ENTER_BR;
};
I'm wondering how your's work.
Even the enter mode is with <p>.
Its so Sad. Someone pleaaase help
It works now. But one problem!
How to put <p> tags now ?:D I thought shift-enter will put <p> now, but shift+enter puts <br> too!
Any help with this?
Enter(default): BR
Shift Enter: P
replace this with your config.js:
/* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P; };Hope it help everyone here
I use the "in page" method, ... I find I have to clear the browser cache after each change - else the old version of the file is used and the changes don't appear.
Defining Configurations In-Page
CKEDITOR.replace( 'editor1',
{
toolbar : 'basic',
uiColor : '# 9AB8F3',
enterMode : CKEDITOR.ENTER_BR,
shiftEnterMode : CKEDITOR.ENTER_P
});
Using the config.js File
CKEDITOR.editorConfig = function( config )
{
config.language = 'fr';
config.uiColor = '#AADC6E';
config.enterMode = CKEDITOR.ENTER_BR;
config.shiftEnterMode = CKEDITOR.ENTER_P;
};
you beat me to it
please set
config.enterMode = 2
it s worked
when you just type
you get
as it seems in the querystring which sends the output from the editor the following when your textarea is named "editortext" you get:
which means <p> CR TAB LF test </p> CR LF
so i just filtered the non-printables (my thing is ASP)
then the normal <p> and </p> remain which you can easily filter also
and all that remains to be saved in your database is
where do you put those lines?