Line break between paragraphs

Hello.

Is it possible to insert a paragraph break after a block of text with an image (on the right or left) so that the next paragraph starts “cleanly” again?

I would like to combine an image and text (formatted as a “lead paragraph”) at the beginning of pages. However, with short texts, the next paragraph starts too early, which makes the layout look less appealing.

Tables are not suitable due to accessibility concerns.

I’d like to avoid using HTML so that my colleagues can quickly make changes using the wiki editor.

Thank you very much and best regards.

Roland

Can you paste the source view of this content?

I’m not sure what a paragraph break is and what you mean by “cleanly” again.

In XWiki syntax you can have some groups using (((...))), but I don’t know if that’s what you’re looking for. See https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiSyntax/?syntax=2.1&section=Groups

Note that the WYSIWYG editor doesn’t allow inserting them ATM. But again, I don’t know if that’s what you’re looking for.

We made a macro for that called paragraph.

{{velocity}}
{{html}}
  <div style="clear:both"></div>
{{/html}}
{{/velocity}}

It’s description is:

This macro resets the floating of the following elements. If you have images floating on the left or right and want to insert new text in a new paragraph below the images, then you must insert this macro before the new text.

Maybe this is an idea for you?

Simpel

1 Like

Thx @Simpel that looks like a good answer.

@Roland please disregard my answer which just shows my bad knowledge of the XWiki’s CSS used :wink:

Just note that you could also not use the html macro and just use the following: (% style="clear:both" %)((()))(in xwiki syntax 2.0+).

@mflorea any idea how we could make this simpler for users using the wysiwyg editor (without them having to create a custom wiki macro)? Thx

1 Like

Could we introduce the concept of “line break” via the “+” button that inserts the code that you’ve posted automatically?

The only recommendation that I would make is to have this break visible when editing so users understand what’s going on and let them delete this element easily.

Thanks a lot @Simpel and @vmassol that did the trick.

Sorry for not answering. I had a few days off.

If you don’t use a macro and instead generate a DIV, that DIV will be editable, meaning that the user will be able to insert text in it. It will look like an empty line. Moreover, DIVs can behave unexpected in CKEditor, compared to paragraphs, so be aware of that.

Ideally, for consistency, the user would simply insert a paragraph (Enter key) and then use right click + “Edit Paragraph Properties”, like we have for lists (where we can change the list style). In this dialog, that doesn’t exist ATM, the user would have an option to clear the float around the paragraph (not sure how to present this in a non-technical way).

I’m not sure if it’s worth adding this on top of CKEditor. Something to keep in mind for BlockNote.

Thanks,
Marius

Yes, sure. OTOH, I believe that we need to keep support for CK for a long time in the future (N years), so I don’t think we should stop improving our WYSIWYG with CK.

Created Loading...