Commit 316b2d80 authored by Frank Bessou's avatar Frank Bessou 🕸

fix: handle text/plain in printable_value

parent 5a7ce91f380e
Pipeline #61394 waiting for manual action with stages
in 1 minute and 26 seconds
......@@ -117,6 +117,8 @@ def printable_value(
attrformat = self.cw_attr_metadata(attr, "format")
if attrformat:
if attrformat == "application/vnd.cubicweb.editorjs":
if format == "text/plain":
return "EditorJS content"
self._cw.add_js("cubes.editorjs.js")
return f'<textarea cubicweb:type="editorjs" cubicweb:mode="read">{value}</textarea>'
return old_printable_value(self, attr, value, attrtype, format, displaytime)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment