Support --html everywhere
[shpub.git] / src / shpub / Request.php
index 0cadc484c6d5391ddde586c107033ec3411e1562..544962b8e061c133467e4bd3312cf247559eefda 100644 (file)
@@ -122,6 +122,18 @@ class Request
         return $this->req->addUpload($fieldName, $filename);
     }
 
         return $this->req->addUpload($fieldName, $filename);
     }
 
+    public function addContent($text, $isHtml)
+    {
+        if ($isHtml) {
+            $this->addProperty(
+                'content', ['html' => $text]
+            );
+        } else {
+            $this->addProperty('content', $text);
+        }
+
+    }
+
     /**
      * Adds a micropub property to the request.
      *
     /**
      * Adds a micropub property to the request.
      *