diff --git a/lib/outlook_web/live/translation_live/form_component.ex b/lib/outlook_web/live/translation_live/form_component.ex index 88112af..eeb60e2 100644 --- a/lib/outlook_web/live/translation_live/form_component.ex +++ b/lib/outlook_web/live/translation_live/form_component.ex @@ -2,7 +2,7 @@ defmodule OutlookWeb.TranslationLive.FormComponent do use OutlookWeb, :live_component alias Outlook.{Translations,InternalTree} - alias Outlook.InternalTree.TranslationUnit + alias Outlook.InternalTree.{TranslationUnit,Html} @impl true def render(assigns) do @@ -195,10 +195,8 @@ defmodule OutlookWeb.TranslationLive.FormComponent do defp publish(translation_params, %{"publish" => "true"}, socket) do translation_params |> Map.put("public_content", - OutlookWeb.HtmlDocComponent.render_doc(%{tree: InternalTree.render_translation(socket.assigns.translation.article.content, - translation_params["content"]), tunit_tag: "span"}) - |> Phoenix.HTML.Safe.to_iodata() - |> IO.iodata_to_binary()) + InternalTree.render_translation(socket.assigns.translation.article.content, translation_params["content"]) + |> Html.render_doc()) end defp publish(translation_params, %{"publish" => "false"}, _) do translation_params