Fix i npages
This commit is contained in:
parent
35fb71090e
commit
1c3792a0fc
2 changed files with 14 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ from paramecio2.libraries.db.coreforms import BaseForm
|
|||
from paramecio2.modules.admin import admin_app, t as admin_t
|
||||
from flask import url_for, g
|
||||
from paramecio2.libraries.mtemplates import env_theme, PTemplate
|
||||
try:
|
||||
import ujson as json
|
||||
except:
|
||||
import json
|
||||
|
||||
env=env_theme(__file__)
|
||||
|
||||
|
|
@ -71,6 +75,10 @@ class TextEditorJsForm(BaseForm):
|
|||
if t_add==None:
|
||||
self.t=t
|
||||
|
||||
#if type(self.default_value)==dict:
|
||||
|
||||
# self.default_value=json.dumps(value)
|
||||
|
||||
def form(self):
|
||||
|
||||
return self.t.load_template('editorjsform.phtml', form=self)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
% if type(form.default_value)==dict:
|
||||
<%
|
||||
form.default_value='{}'
|
||||
%>
|
||||
% endif
|
||||
|
||||
<p>
|
||||
<div id="${form.name_field_id}_editor" style="background: #454545; color: #fbfbfb;">
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue