-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[BBCode] Add info and example of aligning inline objects to the adjacent spans of text. #12072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -807,7 +807,7 @@ Image and table vertical alignment | |||||
|
|
||||||
| When a vertical alignment value is provided with the ``[img]`` or ``[table]`` tag | ||||||
| the image/table will try to align itself against the surrounding text. Alignment is | ||||||
| performed using a vertical point of the image and a vertical point of the text. | ||||||
| performed using a vertical point of the image and a vertical point of the specified part of the text. | ||||||
| There are 3 possible points on the image (``top``, ``center``, and ``bottom``) and 4 | ||||||
| possible points on the text and table (``top``, ``center``, ``baseline``, and ``bottom``), | ||||||
| which can be used in any combination. | ||||||
|
|
@@ -821,6 +821,22 @@ To specify both points, use their full or short names as a value of the image/ta | |||||
|
|
||||||
| .. image:: img/bbcode_in_richtextlabel_image_align.webp | ||||||
|
|
||||||
| To specify part of the text, add one of the following values: | ||||||
|
|
||||||
| - ``p`` (``prev``) - align to the height of text span directly before the image/table. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - ``n`` (``next``) - align to the height of text span directly after the image/table. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - ``a`` (``adjacent``) - align to the maximum height text spans directly before and after the image/table (default for images). | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bit hard to parse, does it mean "the text span with the maximum height"? I.e. "tallest"? |
||||||
| - ``l`` (``line``) - align to the height of the line (default for tables). | ||||||
|
|
||||||
| .. code-block:: none | ||||||
|
|
||||||
| prev[img=center,center,prev]...[/img][font_size=50]text[img=center,center,prev]...[/img][/font_size][font_size=80]text[img=center,center,prev]...[/img][/font_size]text | ||||||
| next[img=center,center,next]...[/img][font_size=50]text[img=center,center,next]...[/img][/font_size][font_size=80]text[img=tcenter,center,next]...[/img][/font_size]text | ||||||
| adj[img=center,center,adjacent]...[/img][font_size=50]text[img=center,center,adjacent]...[/img][/font_size][font_size=80]text[img=center,center,adjacent]...[/img][/font_size]text | ||||||
| line[img=center,center,line]...[/img][font_size=50]text[img=center,center,line]...[/img][/font_size][font_size=80]text[img=center,center,line]...[/img][/font_size]text | ||||||
|
|
||||||
| .. image:: img/bbcode_in_richtextlabel_image_align_scope.webp | ||||||
|
|
||||||
| .. code-block:: none | ||||||
|
|
||||||
| text [table=3,center]...[/table] text # Center to center. | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.