diff libervia/web/pages/_browser/popup.py @ 1635:332822ceae85

browser (chat): Add rich editor, forward and extra recipients: A new "extra" menu is now available next to input field, allowing to toggle to rich editor. Rich editors allows message styling using bold, italic, underline, (un)numbered list and link. Other features will probably follow with time. An extra menu item allows to add recipients, with `to`, `cc` or `bcc` flag like for emails. Messages can now be forwarded to any entity with a new item in the 3 dots menu. rel 461
author Goffi <goffi@goffi.org>
date Fri, 04 Jul 2025 17:47:37 +0200
parents a2cd4222c702
children
line wrap: on
line diff
--- a/libervia/web/pages/_browser/popup.py	Fri Jul 04 17:40:18 2025 +0200
+++ b/libervia/web/pages/_browser/popup.py	Fri Jul 04 17:47:37 2025 +0200
@@ -11,15 +11,17 @@
     content_elt,
     focus_class="has-popup-focus",
     focus_elt=None,
+    placement="bottom",
     **kwargs
 ):
-    """Create a popup and show a popup below a target
+    """Create a popup and show a popup next to a target
 
     The popup is created and destroyed on each call, this can be used for dynamic content.
     @param target: element where the popup will appear, or a selector
     @param content_elt: HTML element to show in the popup
     @param focus_class: class added to target element when popup is shown
     @param focus_elt: element where focus_class is added. If None, target will be used.
+    @param placement: where the popup must be located.
     @param kwargs: arguments used to override tippy options
     """
     if focus_elt is None:
@@ -31,7 +33,7 @@
         "trigger": "click",
         "content": content_elt,
         "appendTo": document.body,
-        "placement": "bottom",
+        "placement": placement,
         "interactive": True,
         "trigger": "manual",
         "theme": "light",