When FckEditor initilized, the content value got the opening <p></p>
the content value display in the page, it got a extra paragraph
how to delete the opening <p></P>
or just let the <p></P> can not be generated when fckeditor is used
the content value display in the page, it got a extra paragraph
how to delete the opening <p></P>
or just let the <p></P> can not be generated when fckeditor is used
Re: How to remove the opening <p> tag
Re: How to remove the opening <p> tag
and change settings eg
FCKConfig.EnterMode = 'br' ; // p | div | br
FCKConfig.ShiftEnterMode = 'p' ; // p | div | br
Re: How to remove the opening <p> tag
When I check in my database where the info is stored, the data is still wrapped in <p> and </p> as shown below:
<p>1 more test for today</p>
Any way to make those tags go away???
Re: How to remove the opening <p> tag
Thanks,
TC~
Re: How to remove the opening <p> tag
lside = left(data,13)
lside = Replace(lside,"<p> </p>","")
rside = right(data,13)
rside = Replace(rside,"<p> </p>","")
middle = mid(data,14,last)
data=lside&middle&rside
It's ugly, but I hope it helps.
Re: How to remove the opening <p> tag
there has got to be a cleaner way. I'm running FCKEditor inside Drupal, and don't want to edit the core distribution of Drupal.
Sad that I might have to use TinyMCE.
Re: How to remove the opening <p> tag
Useful if you use FCKeditor with Drupal, but a slight pain none the less.
It would be nice if you could have it use <div> instead of <p> though.
Re: How to remove the opening <p> tag
Re: How to remove the opening <p> tag
Code:
works ! ... but when you change these lines, you have to disable cache in your browser, ... after that it works to me
Re: How to remove the opening <p> tag
Re: How to remove the opening <p> tag
Thanks, Gary
Re: How to remove the opening <p> tag
It looks like this fix the problem, but I didn't get a paragraph when i type Shift + Enter, even if i set the value
FCKConfig.ShiftEnterMode = 'p' ;.
Regarding this linkhttp://dev.fckeditor.net/ticket/1853 the problem was fixed, so the solution is to upgrade to the latest version.
Re: How to remove the opening <p> tag
Hello,
Let me share with you my own fix which works perfectly for me for CKEditor ver. 3.6.2.
Below file "/ckeditor/config.js" is correct:
Original file has two mistakes:
1. Both settings 'EnterMode' and 'ShiftEnterMode' should start with lower letter like above (JavaScript is case-sensitive).
2. You cannot set string 'br' or 'p' as enterMode or shiftEnterMode, but you should use integer values (example: config.enterMode = 1), but best practice is to use predefined in "/ckeditor/_source/core/config.js" constants like ENTER_BR and ENTER_P.
I hope it helps you all.
Best regards,
SoftMaker.pl
www.softmaker.pl
Re: How to remove the opening <p> tag
The syntax stated in previous posts is the correct one, but of course it will not work if you use CKEditor, in that case you must use the options that you've stated.
Re: How to remove the opening <p> tag
Hello alfonsoml,
Yes, topic is quite old and for FCKeditor, but problem is still unsolved for CKeditor in production version 3.6.2 (why??). While this problem is still current and if I've found nice solution I'd like to share it with others - that's all.
I have no idea what do you mean by "it will not work if you use CKEditor", because solution I presented is exactly for CKEditor in current newest production version 3.6.2 that I downloaded directly from this website.
Best regards,
SoftMaker.pl
www.softmaker.pl
Re: How to remove the opening <p> tag
And the syntax in previous posts is this one for example: and clearly that won't work with CKEditor.
Again, the previous posts didn't explain anything wrong, it's just that you are trying to apply it to a wrong version. It's like seeing some code in Java and then stating that it's wrong because the correct syntax for C++ is this other one.
Re: How to remove the opening <p> tag
Hello again,
It's not a problem if I like or not some HTML tags. Also I understand why editor use block tag by itself. That's a good idea. But sometimes programmers wants to have clear code, without additional tags. That's why there is an option to turn it off in config.js. And it should work, but it doesn't. That's why people looks for fix on the internet including myself.
Yes, it doesn't work with CKEditor in version 3.6.2, but my fix works fine.
I didn't mention about C++/Java syntax, but wrong variable type - string ('p', 'br') instead of integer (1, 2). If it's changed betweeen FCKEditor and CKEditor, I don't know. Also I used predefined (by CKEditor's authors) constants, which is good programming practice, independent of language is used. Hardcoded values are always bad and hard to maintain source code in any programming language. In case of change variable from string to integer, it should be work without any changes in source code - many problems could be avoided.
I think I explained in clear way what is wrong - in my opinion. Also I shared my fix with all others, which it works and this is an answer for problem from subject "How to remove the opening <p> tag". Anyone can try to apply my fix and check it by itself. I hope it helps with CKEditor, just like helped me. That's all.
Best regards,
SoftMaker.pl
www.softmaker.pl