Skip to content

Commit a960ebd

Browse files
authored
Update README.md (#18)
more examples to readme
1 parent 7b1d31c commit a960ebd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ post = Post(
5858

5959
post.add({'type': 'paragraph', 'content': 'This is how you add a new paragraph to your post!'})
6060

61+
#bolden text
62+
post.add({'type': "paragraph",'content':[{'content': "This is how you "},{'content': "bolden ",'marks':[{'type': "strong"}]},{'content': "a word."}]})
63+
64+
#add hyperlink to text
65+
post.add({'type':'paragraph','content':[{'content': "View Link",'marks':[{'type': "link",'href':'https://whoraised.substack.com/'}]}]})
66+
67+
#add image
68+
post.add({'type':'captionedImage','src': "https://media.tenor.com/7B4jMa-a7bsAAAAC/i-am-batman.gif"})
69+
6170
draft = api.post_draft(post.get_draft())
6271

6372
api.prepublish_draft(draft.get("id"))

0 commit comments

Comments
 (0)