Jump to content

Textarea markup


mel47
 Share

Recommended Posts

Hi

I have a simple question but I'm unable to find answer. I have a summary field with CKeditor. When I want to render this field, It always get wrapped by a <p>text</p>. But I don't want those paragraphs. How to remove them? If I use $sanitizer, it also removes other tags (<a>).

Thanks

Link to comment
Share on other sites

On 2017-01-22 at 9:55 PM, Robin S said:

Why not? Seems like a paragraph tag is the appropriate markup for a paragraph of text.

Yeah, I think it is the problem. I don't want to use it as a paragraph. I considering changing to a different field.

Link to comment
Share on other sites

12 minutes ago, mel47 said:

Yeah, I think it is the problem. I don't want to use it as a paragraph. I considering changing to a different field.

Depending on your needs, you could set margin:0 for the p tag in the required div, which would make it look like a normal line break. But again, this may not be appropriate, but it is another potential option.

You might also try CKEditor settings for that particular field to not add p tags in the first place: http://stackoverflow.com/questions/3339710/how-to-configure-ckeditor-to-not-wrap-content-in-p-block

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...