Files
phoenix-ausblick/lib/outlook/html_preparations.ex
Thelonius Kort b7bd9195b6 Add importing html and save it to Article
Additionally defines a wizard logic which is partially unused yet.
2022-12-29 16:43:52 +01:00

21 lines
482 B
Elixir

defmodule Outlook.HtmlPreparations do
@moduledoc """
The HtmlPreparations context.
"""
alias Outlook.HtmlPreparations.HtmlPreparation
def convert_raw_html_input(html) do
html
|> Floki.parse_fragment!
|> HtmlPreparation.floki_to_internal
|> HtmlPreparation.set_sibling_with
end
def get_tree_items(content_tree) do
content_tree
|> HtmlPreparation.strip_whitespace_textnodes
|> HtmlPreparation.build_indentation_list(0)
end
end