From 70e64e6e97a2609299a323bf41607b7a2e17550a Mon Sep 17 00:00:00 2001 From: f Date: Thu, 22 Apr 2021 13:09:49 -0300 Subject: [PATCH] usar el editor en otros campos como reemplazo del campo `markdown` que coloca texto con markdown en el front matter. --- app/models/metadata_content.rb | 10 +++++++--- app/models/metadata_html.rb | 12 ++++++++++++ app/views/posts/attributes/_html.haml | 6 ++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 app/models/metadata_html.rb create mode 100644 app/views/posts/attributes/_html.haml diff --git a/app/models/metadata_content.rb b/app/models/metadata_content.rb index b11818a2..525f38ab 100644 --- a/app/models/metadata_content.rb +++ b/app/models/metadata_content.rb @@ -15,14 +15,18 @@ class MetadataContent < MetadataTemplate false end + def document_value + document.content + end + private # Detectar si el contenido estaba en Markdown y pasarlo a HTML def legacy_content - return unless document.content - return document.content if /^\s*