Meta Hyperlink Behaviour
MetaHyperlinkBehaviour class for “meta:hyperlink-behaviour” tag.
Classes:
| Name | Description |
|---|---|
MetaHyperlinkBehaviour |
Container for hyperlink-behaviour properties, “meta:hyperlink- |
MetaHyperlinkBehaviour
Bases: Element
Container for hyperlink-behaviour properties, “meta:hyperlink- behaviour”.
Methods:
| Name | Description |
|---|---|
__init__ |
Initialize a MetaHyperlinkBehaviour element. |
__repr__ |
|
__str__ |
|
as_dict |
Return the attributes of the hyperlink behavior element as a Python dictionary. |
from_dict |
Set the attributes of the hyperlink behavior element from a Python dictionary. |
Attributes:
| Name | Type | Description |
|---|---|---|
show |
|
|
target_frame_name |
|
Source code in odfdo/meta_hyperlink_behaviour.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
_properties
class-attribute
instance-attribute
_properties: tuple[PropDef | PropDefBool, ...] = (
PropDef(
"target_frame_name", "office:target-frame-name"
),
PropDef("show", "xlink:show"),
)
_tag
class-attribute
instance-attribute
_tag = 'meta:hyperlink-behaviour'
show
instance-attribute
show = show
target_frame_name
instance-attribute
target_frame_name = target_frame_name
__init__
__init__(
target_frame_name: str = "_blank",
show: str = "replace",
**kwargs: Any,
) -> None
Initialize a MetaHyperlinkBehaviour element.
The meta:hyperlink-behaviour element specifies the default behavior
for hyperlinks in a document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_frame_name
|
str
|
The name of the target frame for the hyperlink. Defaults to “_blank” (new window/tab). |
'_blank'
|
show
|
str
|
Specifies how the target resource is presented. Defaults to “replace”. |
'replace'
|
**kwargs
|
Any
|
Additional keyword arguments for the parent |
{}
|
Source code in odfdo/meta_hyperlink_behaviour.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__repr__
__repr__() -> str
Source code in odfdo/meta_hyperlink_behaviour.py
64 65 66 67 68 | |
__str__
__str__() -> str
Source code in odfdo/meta_hyperlink_behaviour.py
70 71 | |
as_dict
as_dict() -> dict[str, Any]
Return the attributes of the hyperlink behavior element as a Python dictionary.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: A dictionary containing the hyperlink behavior attributes, with keys like “office:target-frame-name” and “xlink:show”. |
Source code in odfdo/meta_hyperlink_behaviour.py
73 74 75 76 77 78 79 80 81 82 83 | |
from_dict
from_dict(data: dict[str, Any]) -> None
Set the attributes of the hyperlink behavior element from a Python dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
A dictionary containing the hyperlink behavior attributes (e.g., “office:target-frame-name”, “xlink:show”). |
required |
Source code in odfdo/meta_hyperlink_behaviour.py
85 86 87 88 89 90 91 92 93 | |