handle editting html properly for custom html block

This commit is contained in:
David Botton 2022-07-21 02:55:30 -04:00
parent 616a623c48
commit 2028bb2d7a
2 changed files with 57 additions and 54 deletions

View file

@ -335,11 +335,11 @@
`((:name "html contents"
:setup ,(lambda (control td1 td2)
(declare (ignore td1))
(let ((d1 (create-text-area td2 :value (attribute control "data-original-html"))))
(let ((d1 (create-text-area td2 :value (escape-string (attribute control "data-original-html") :html t))))
(set-on-change d1 (lambda (obj)
(declare (ignore obj))
(setf (attribute control "data-original-html") (escape-string (value d1) :html t))
(setf (inner-html control) (escape-string (value d1) :html t)))))
(setf (attribute control "data-original-html") (value d1))
(setf (inner-html control) (value d1)))))
nil))))
(defparameter *props-text*