Add hyphenation and a generalized render_public_content function
This commit is contained in:
@ -197,8 +197,12 @@ defmodule OutlookWeb.TranslationLive.FormComponent do
|
||||
defp publish(translation_params, %{"publish" => "true"}, socket) do
|
||||
translation_params
|
||||
|> Map.put("public_content",
|
||||
InternalTree.render_translation(socket.assigns.translation.article.content, translation_params["content"])
|
||||
|> Html.render_doc())
|
||||
InternalTree.render_public_content(
|
||||
socket.assigns.translation.article.content,
|
||||
socket.assigns.translation_content,
|
||||
socket.assigns.translation.language
|
||||
)
|
||||
)
|
||||
end
|
||||
defp publish(translation_params, %{"publish" => "false"}, _) do
|
||||
translation_params
|
||||
|
||||
Reference in New Issue
Block a user