beginnings of a test component.
[clinton/lisp-on-lines.git] / src / standard-attributes.lisp
index d855e9d..492a06b 100644 (file)
@@ -1,13 +1,28 @@
 (in-package :lisp-on-lines)
 
+;;;; Strings
+
+(defattribute string-attribute ()
+  ()
+  (:type-name string)
+  (:default-properties
+      :escape-html-p t))
+
+(defdisplay object (:description (string string-attribute))
+  (<:as-html "ASD")
+  (if (getp :escape-html-p)
+      (<:as-html (attribute-value object string))
+      (<:as-is (attribute-value object string))))
+
+
 (defattribute image ()
   ())
 
-(defdisplay (:description (buttons (eql 'image-editor-buttons)))
+(defdisplay object (:description (buttons (eql 'image-editor-buttons)))
   (<ucw:a :action (ok component object)
          (<:as-html "select this image")))
 
-(defdisplay (:description (image image))
+(defdisplay object (:description (image image))
   (<:img
    :class (or (getp :css-class) "lol-image") 
    :src (arnesi:strcat
@@ -15,7 +30,7 @@
         (escape-as-uri
          (attribute-value object image)))))
 
-(defdisplay (:description (image image)
+(defdisplay object (:description (image image)
             :in-layer editor)
   (<:div
    :class "lol-image-thumbnails"