Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing <p> Tags
#1
The editor automatically adds in <p></p> tags to the content. Is there any way to disable that?
Reply
#2
No there is not, because there is no valid reason to disable the usage of the P-element. If you get empty P-elements it’s because you’re creating empty rows the wrong way. The only “correct” way would be to space text through CSS.

If you give an example of when you want this to be disabled someone might be able to solve it some other way.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
Well I'm making a redirect template where it just pulls the URL to redirect to from the content area, where you can paste in the URL. PHP wasn't stripping the <p> tags effectively so I though it would be easier to keep the editor from automatically adding in the <P>
Reply
#4
I’m afraid there is no smart way to do that. But you could use a regular expression to use PHP to easily get the URL from the content variable I think.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#5
Maybe you could just use CustomFields instead of the content area, and use something like this at the top of your template.
Code:
<?php
    $tplRedirect = returnCustomField('redirect');
    if ($tplRedirect != '') { header("Location: " . $tplRedirect); }
?>
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#6
Adding <p> tag when hitting [enter] in editor window is a CKeditor's feature.
You can change [enter] behaviour to add <br /> instead of <p>.
Just add this line to ckeditor's config.js
Code:
config.enterMode = CKEDITOR.ENTER_BR;
Addons: blue business theme, Online Visitors, Notepad
Reply
#7
If you want to enter a line break instead of a paragraph, just press `[shift] + [enter]` like you would in most Word Processor's.
-- Sam
Reply




Users browsing this thread: 1 Guest(s)