turnermm / ckgedit

CKEditor integrated into Dokuwiki
https://www.dokuwiki.org/plugin:ckgedit
GNU General Public License v2.0
60 stars 49 forks source link

Line break / newline #207

Closed proxymus closed 8 years ago

proxymus commented 8 years ago

Hello, I use he latest farm branch of ckgedit. In the classic DW editor I can write a text with line breaks like this:

2016-05-31 14_56_22

When I save this with ckgedit I will get the following: 2016-05-31 14_57_48

How can I realize a new line / line break (without paragraph) with ckgedit? I can use SHIFT+ENTER, but this isn't saved.

Thank you in advance.

turnermm commented 8 years ago

SHIFT-RETURN creates a single line break. RETURN on its own creates a new paragraph.

proxymus commented 8 years ago

I would like to have single line breaks within my text, but this isn't working for me. When I edit the example above I can see that the single line break is saved, but in the "view mode" I have paragraphs between each line.

turnermm commented 8 years ago

I'm afraid I don't follow the above. If the single is saved then what is the 'view mode' where it shows as a paragraph?

Also, you say 'latest" version: what is the version number, which you can get by clicking on the ? in the toolbar. Is it the version using CKEditor 4.5.1 or 4.5.7? And what is the version date? This is my result using the 4.5.7 version: 2016-06-04 12_47_25-start robin vfarms bz

proxymus commented 8 years ago

I use the version 4.5.7 (https://github.com/turnermm/ckgedit/archive/farms_4.7.zip). ckgedit-version

I've written that:

2016-06-06 08_31_21-line break This is the source code view: 2016-06-06 08_31_32-line break After I've saved the page this is the result: 2016-06-06 08_31_45-line break

I hope it is now a bit clearer.

proxymus commented 8 years ago

I found the difference. Ckgedit saves the line break as \\ and the native dokuwiki editor doesn't use this. CKGEDIT: 2016-06-06 09_59_08_ckgedit

DWEDIT: 2016-06-06 09_58_55_dwedit

\\ is working in the list element, but not in normal text. 2016-06-06 10_01_29-line break 2 2016-06-06 10_02_04

turnermm commented 8 years ago

https://www.dokuwiki.org/wiki:syntax#basic_text_formatting

http://www.mturner.org/devel/playground/line_spacing#single_line_spaced_shift_enter

proxymus commented 8 years ago

https://www.dokuwiki.org/wiki:syntax#basic_text_formatting

This is working with ckgedit. I assumed that I could use Shift+Enter, because this is working in the default DW editor too. I've used the \\ only within list elements.

turnermm commented 8 years ago

Truthfully, I am not following you. SHIFT+ENTER is not a dokuwiki editor function, it is a ckgeditor function. However, in the ckgeditor, you can actually insert the double backslash, just as in the default edtior, and you will get single line spacing. In the dokuwiki editor, if you are in a list and hit SHIFT+ENTER, you will get another list item, not a single spaced line. If you are not in a list and hit SHIFT+ENTER in the dokuwiki editor, when you save the document, the line break will disappear.

proxymus commented 8 years ago

You are right. We have installed the xbr plugin (https://www.dokuwiki.org/plugin:xbr) which preserves the line breaks. I did not think about that.

proxymus commented 8 years ago

Thank you for clarification. Now I can use the default rendering engine again. :)