Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10022 closed Bug (invalid)

Can't get rid of <p>

Reported by: Danil Owned by:
Priority: Normal Milestone:
Component: Core : Editable Version:
Keywords: Cc:

Description

When I select Heading 1 Style in style listbox, I can select it again to disable this style. But I can't disable <p> even when autoParagraph:false. I need to insert specific CMS tags, but CKEditor wraps it into paragraphs.

Change History (5)

comment:1 Changed 11 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

Either use Enter mode set to DIV or BR - http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode or use protectedSource - http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource.

Please note that CKEditor is HTML editor - it works with HTML and knows nothing about your custom tags.

comment:2 Changed 11 years ago by Wiktor Walc

Depending on what CMS tags you need to be able to insert, instead of switching to BR mode, you can try writing a plugin that would simply remove the paragraphs when generating the HTML source code.

It should be quite easy to implement when 4.1 will be ready (editor#toHtml and editor#toDataFormat events will be introduced there, making any HTML modifications/transformations much simpler).

comment:3 Changed 11 years ago by Danil

TinyMCE is also HTML editor. But it's Format combo allows to toggle Paragraph format (like other ones, such as H1, H2, pre etc)

In the CKEditor I try to toggle Normal format but nothing happens, just nothing. This is definitely bug. I have to switch to source mode, delete <p> and </p> and switch back to the wysiwyg mode. Such a complex action for such a simple result.

I'm surprised this ticket is closed instantly.

I don't want CKEditor to know my special cms tags, I just want it to let me to switch Format to None (like the TinyMCE). Why not? This behavior is a pain in the ass for many users.

comment:4 Changed 11 years ago by Wiktor Walc

Okay, check enter mode BR and let me know if this is what you're actually looking for?

comment:5 Changed 11 years ago by Danil

No, I want CKEditor to use <p> , not <br>. But sometimes I need to remove some <p> wrappers when I don't need it. Ok, I'll prepare little demo with TinyMCE.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy