Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
editorjs
Commits
316b2d80dca0
Commit
316b2d80
authored
Jun 11, 2021
by
Frank Bessou
🍁
Browse files
fix: handle text/plain in printable_value
parent
5a7ce91f380e
Pipeline
#61394
waiting for manual action with stages
in 1 minute and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_editorjs/__init__.py
View file @
316b2d80
...
...
@@ -117,6 +117,8 @@
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment