replace_with_div | R Documentation |
This modifies a document to replace a blockquote element with a div element
replace_with_div(block)
block |
a blockquote element |
the children of the element, invisibly
Other div:
clean_div_tags()
,
find_between_tags()
,
find_div_pairs()
,
get_divs()
,
label_div_tags()
,
label_pairs()
,
make_div()
,
make_div_pairs()
frg <- Lesson$new(lesson_fragment())
lop <- frg$episodes$`14-looping-data-sets.md`
xml2::xml_find_all(lop$body, ".//d1:html_block")
lop$get_blocks(level = 1)
lop$get_blocks(level = 2)
purrr::walk(lop$get_blocks(level = 2), pegboard:::replace_with_div)
purrr::walk(lop$get_blocks(level = 1), pegboard:::replace_with_div)
lop$get_blocks()
# add tags
pegboard:::label_div_tags(lop$body)
lop$get_divs()
xml2::xml_text(lop$get_divs()[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.