Link
Link class for “text:a” tag.
Classes:
| Name | Description |
|---|---|
Link |
Representation of a link (URL), “text:a”. |
Link
Bases: MDLink, UserDefinedMixin, ParaFormattedTextMixin, ReferenceMixin, BookmarkMixin, AnnotationMixin, NoteMixin, Element
Representation of a link (URL), “text:a”.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
target url (href) |
|
name |
name (html name) |
|
title |
title (hint) |
|
text |
link text |
|
target_frame |
’_self’, ‘_blank’, ‘_parent’, ‘_top’ |
|
style |
style name |
|
visited_style |
visited style name |
Methods:
| Name | Description |
|---|---|
__init__ |
Create a Link, “text:a” |
__repr__ |
|
__str__ |
|
Source code in odfdo/link.py
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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
_properties
class-attribute
instance-attribute
_properties: tuple[PropDef | PropDefBool, ...] = (
PropDef("url", "xlink:href"),
PropDef("name", "office:name"),
PropDef("title", "office:title"),
PropDef("target_frame", "office:target-frame-name"),
PropDef("show", "xlink:show"),
PropDef("visited_style", "text:visited-style-name"),
PropDef("style", "text:style-name"),
)
_tag
class-attribute
instance-attribute
_tag = 'text:a'
name
instance-attribute
name = name
show
instance-attribute
show = 'new'
style
instance-attribute
style = style
target_frame
instance-attribute
target_frame = target_frame
text
instance-attribute
text = text
title
instance-attribute
title = title
url
instance-attribute
url = url
visited_style
instance-attribute
visited_style = visited_style
__init__
__init__(
url: str | None = "",
name: str | None = None,
title: str | None = None,
text: str | None = None,
target_frame: str | None = None,
style: str | None = None,
visited_style: str | None = None,
**kwargs: Any,
) -> None
Create a Link, “text:a”
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str | None
|
target url (href) |
''
|
name
|
str | None
|
name (html name) |
None
|
title
|
str | None
|
title (hint) |
None
|
text
|
str | None
|
link text |
None
|
target_frame
|
str | None
|
’_self’, ‘_blank’, ‘_parent’, ‘_top’ |
None
|
style
|
str | None
|
style name |
None
|
visited_style
|
str | None
|
visited style name |
None
|
Source code in odfdo/link.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
__repr__
__repr__() -> str
Source code in odfdo/link.py
114 115 | |
__str__
__str__() -> str
Source code in odfdo/link.py
117 118 119 120 121 | |