Update formatted_text.py
This commit is contained in:
parent
73e90e467e
commit
a11a4ca4c2
@ -10,6 +10,10 @@ https://pandoc.org/installing.html
|
||||
|
||||
|
||||
class FormattedText:
|
||||
"""
|
||||
the self.html value should be saved to the database
|
||||
"""
|
||||
|
||||
doc = None
|
||||
|
||||
def __init__(
|
||||
@ -52,22 +56,12 @@ class FormattedText:
|
||||
return None
|
||||
return pandoc.write(self.doc, format="plain").strip()
|
||||
|
||||
@property
|
||||
def json(self) -> str:
|
||||
if self.doc is None:
|
||||
return None
|
||||
return pandoc.write(self.doc, format="json")
|
||||
|
||||
plaintext = property(fget=get_plaintext, fset=set_plaintext)
|
||||
markdown = property(fget=get_markdown, fset=set_markdown)
|
||||
html = property(fget=get_html, fset=set_html)
|
||||
|
||||
|
||||
class NotesAttributes:
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
_plaintext = """
|
||||
World of Work
|
||||
|
Loading…
Reference in New Issue
Block a user