mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 18:50:42 -08:00
handle editting html properly for custom html block
This commit is contained in:
parent
616a623c48
commit
2028bb2d7a
2 changed files with 57 additions and 54 deletions
|
|
@ -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*
|
||||
|
|
|
|||
|
|
@ -701,10 +701,12 @@ not a temporary attached one when using select-control."
|
|||
(labels ((add-siblings (control)
|
||||
(let (dct)
|
||||
(loop
|
||||
(unless control (return))
|
||||
(when (equal (html-id control) "undefined") (return))
|
||||
(setf dct (attribute control "data-clog-name"))
|
||||
(unless (equal dct "undefined")
|
||||
(setf control (get-from-control-list app panel-id (html-id control)))
|
||||
(when control
|
||||
(let ((vname (attribute control "data-clog-name"))
|
||||
(control-record (control-info (attribute control "data-clog-type"))))
|
||||
(unless (and (>= (length vname) 5)
|
||||
|
|
@ -757,8 +759,9 @@ not a temporary attached one when using select-control."
|
|||
vname
|
||||
handler)
|
||||
creates)))))
|
||||
(add-siblings (first-child control)))
|
||||
(setf control (next-sibling control))))))
|
||||
(add-siblings (first-child control))))
|
||||
(when control
|
||||
(setf control (next-sibling control)))))))
|
||||
(add-siblings (first-child content)))
|
||||
(let ((result (format nil
|
||||
"\(in-package \"~A\"\)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue