Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12609 closed Bug (fixed)

Magic Line magicline_putEverywhere = true not working after <p>

Reported by: Ryan Daley Owned by:
Priority: Normal Milestone: CKEditor 4.4.6
Component: General Version: 4.0 Beta
Keywords: Magicline Magic Line putEverywhere Cc: RyanMDaley@…

Description

We are using config.enterMode = CKEDITOR.ENTER_BR and therefore want to be able to insert a new paragraph after an existing one since hitting Enter won't create one. Magic Line would allow this if it would appear after paragraphs.

According to documentation setting to greedy mode should achieve this: config.magicline_putEverywhere = true; in config.js

It did not, also tried adding to the global and instance in the code as well: CKEDITOR.config.magicline_putEverywhere = true; CKEDITOR.instancesinstanceId?.config.magicline_putEverywhere = true;

None of the three worked. Tested on demo with same results but it probably isn't even running in greedy mode. Reproduced in IE 10, IE 10 under compatibility mode for 9 and 8, Chrome 37 and FF 31.

There is no blacklist being used. CKEDITOR.config.magicline_tabuList = []; was even added to assure no block elements were excluded. It was also verified that CKEDITOR.dtd.$block contained p:1.

Magicline is included properly and does appear in other cases for example between bulletted lists or between bullet list and end of editor. It appears between HRs in the demo as well but we don't have HR allowed in ACF.

It is not known when, or if, this was working between paragraphs as it should for magicline_putEverywhere = true, so listing the latest rev which, is what we are using.

Essentially, it would be nice to be able to add separate sections of text in wysiwyg mode (that translate to paragraph tagged sections) while in CKEDITOR.ENTER_BR mode instead of forcing additional text into the bottom of the preceding <p>. This would allow the desired creation of and separate drag and drop of the individual paragraphs (existing ones and future ones added between/after existing ones) while still enforcing single line returns (<BR> not <P> on user hitting return) within them.

Magic Line should be the straight forward way to achieve this. Without creating a new paragraph, workarounds include select/drag region of text and drop but less user friendly and still remains tied to whatever p it is dropped in, cannot become it's own. A Shift + Enter is also possible to do the <BR> and then switch to default <P> enter mode but is undesirable for us that users need to shit + enter to get a single spaced line break.

Attachments (2)

magicline_putEverywhere_between_paragraphs.png (4.7 KB) - added by Ryan Daley 10 years ago.
Want Magic line to show here to add paragraphs before/between/after paragraphs in <BR> enter mode
magicline_working.png (44.2 KB) - added by Ryan Daley 10 years ago.
Working between lists

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by Ryan Daley

Note the instances array had square brackets but they instead highlighted text and appended a question mark.

Changed 10 years ago by Ryan Daley

Want Magic line to show here to add paragraphs before/between/after paragraphs in <BR> enter mode

Changed 10 years ago by Ryan Daley

Attachment: magicline_working.png added

Working between lists

comment:2 Changed 10 years ago by Ryan Daley

comment:3 Changed 10 years ago by Olek Nowodziński

Status: newconfirmed

Thanks! Your bug report let us understand that there's a nasty documentation bug in magicline plugin: what supposed to be config.magicline_putEverywhere it is, in a matter of fact config.magicline_everywhere.

Could you tell us whether config.magicline_everywhere does the job for you before we fix the typo?

comment:4 Changed 10 years ago by Olek Nowodziński

Milestone: CKEditor 4.4.6

comment:5 Changed 10 years ago by Jakub Ś

therefore want to be able to insert a new paragraph after an existing one since hitting Enter won't create one.

Please note that Magic Line creates new lines which match enter mode. This means that it won't insert Paragraph in all cases. It will create paragraph in EnterMode P, div in EnterMode DIV and empty line in EnterMode BR.
If you want to insert new paragraphs in enterMode BR, please configure CKEditor to insert them in shiftEnterMode - that is the only way.

comment:6 Changed 10 years ago by Olek Nowodziński

Resolution: fixed
Status: confirmedclosed

Fixed in git:c2a102fef.

comment:7 Changed 10 years ago by Olek Nowodziński

Version: 4.4.6 (GitHub - master)4.0 Beta
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