
    	e                        d Z ddlmZ ddlmZmZmZmZ ddlZddl	m
Z
 ddlmZ dd	lmZ erdd
lmZ ddlmZ ddl	mZ  G d de          ZdS )z8
Defines a WYSIWYG TextEditor widget based on quill.js.
    )annotations)TYPE_CHECKINGClassVarMappingOptionalN)JupyterComm   )	lazy_load   )Widget)Document)Model)Commc                       e Zd ZU dZ ej        dd          Z ej        dddgd          Z ej	        d	e
efd
          Z ej        d          Z ej        d          ZdddZded<   	 	 dd  fdZ xZS )!
TextEditora[  
    The `TextEditor` widget provides a WYSIWYG
    (what-you-see-is-what-you-get) rich text editor which outputs HTML.

    The editor is built on top of the [Quill.js](https://quilljs.com/) library.

    Reference: https://panel.holoviz.org/reference/widgets/TextEditor.html

    :Example:

    >>> TextEditor(placeholder='Enter some text')
    Fz(
        Whether the editor is disabled.)defaultdoctoolbarbubblezD
        Whether to display a toolbar or a bubble menu on highlight.)r   objectsr   Tzi
        Toolbar configuration either as a boolean toggle or a configuration
        specified as a list.)r   class_r   z,Placeholder output when the editor is empty.)r   z'State of the current text in the editornametext)r   valuez"ClassVar[Mapping[str, str | None]]_renameNr   r   rootOptional[Model]parentcommOptional[Comm]returnr   c                    | j         ,t          ddt          |t                    |d          | _         t	                                          ||||          S )Nzpanel.models.quill
QuillInput
texteditor)ext)_widget_typer
   
isinstancer   super
_get_model)selfr   r   r   r   	__class__s        8lib/python3.11/site-packages/panel/widgets/texteditor.pyr)   zTextEditor._get_model7   s[     $ )$lJt[4Q4Q,! ! !D ww!!#tVT:::    )NNN)
r   r   r   r   r   r   r   r    r!   r   )__name__
__module____qualname____doc__paramBooleandisabledSelectormodeClassSelectorlistboolr   Stringplaceholderr   r   __annotations__r)   __classcell__)r+   s   @r,   r   r      s           u}U 1+ , , ,H 5>)h	5J QG H H HD "e!$d| J  ! ! !G %,#QRRRKELFGGGE 3 3G    
 6:?C	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	;r-   r   )r1   
__future__r   typingr   r   r   r   r2   pyviz_commsr   utilr
   baser   bokeh.documentr   bokeh.modelr   r   r    r-   r,   <module>rF      s    # " " " " "             # # # # # #             !''''''!!!!!!      ); ); ); ); ); ); ); ); ); );r-   