diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 792dc3e..e1ef441 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -9,6 +9,7 @@
   var unspecifiedClass = require('vc/unspecified');
   var operatorsClass =   require('vc/operators');
   var rewriteClass =     require('vc/rewrite');
+  var stringValClass =   require('vc/stringval');
 
   // Helper method for building factories
   buildFactory = function (objClass, defaults) {
@@ -1943,5 +1944,19 @@
     expect(docKey.toString()).toEqual('...');
     });
     });
+
+      expect(
+	function() { menuItemClass.create([]) }
+      ).toThrow(new Error("Missing parameters"));
+
+
   */
+
+  describe('KorAP.stringValue', function () {
+    it('should be initializable', function () {
+      var sv = stringValClass.create();
+      expect(sv.regex()).toBe(false);
+      expect(sv.value()).toBe('');
+    });
+  });
 });
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index a19430a..23cec07 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -5,8 +5,9 @@
 define([
   'vc/jsonld',
   'vc/rewritelist',
+  'vc/stringval',
   'util'
-], function (jsonldClass, rewriteListClass) {
+], function (jsonldClass, rewriteListClass, stringValClass) {
 
     /*
       var fieldMenu = menuClass.create([
diff --git a/dev/js/src/vc/stringval.js b/dev/js/src/vc/stringval.js
new file mode 100644
index 0000000..e07b6a4
--- /dev/null
+++ b/dev/js/src/vc/stringval.js
@@ -0,0 +1,91 @@
+/**
+ * Add string values to the virtual collection
+ */
+define({
+  create : function () {
+    var regex = false;
+    var value = '';
+    if (arguments.length == 2) {
+      regex = arguments[1];
+    };
+    if (arguments.length > 1) {
+      value = arguments[0];
+    };
+    return Object.create(this)._init(value, regex);
+  },
+  
+  _init : function (value, regex) {
+    this.element();
+    this.value(value);
+    this.regex(regex);
+    return this;
+  },
+
+  regex : function (bool) {
+    if (arguments.length === 1) {
+      if (bool) {
+	this._regex = true;
+      }
+      else {
+	this._regex = false;
+      };
+      this._update();
+    };
+    return this._regex;
+  },
+
+  toggleRegex : function () {
+    if (this._regex === false)
+      this.regex(true);
+    else
+      this.regex(false);
+  },
+  
+  value : function (val) {
+    if (arguments.length === 1) {
+      this._value = val;
+      this._update();
+    };
+    return this._value;
+  },
+  
+  _update : function () {
+    this._input.firstChild.data = this._value;
+    if (this._regex) {
+      this._element.classList.add('regex');
+    }
+    else {
+      this._element.classList.add('regex');
+    };
+  },
+  
+  element : function () {
+    if (this._element !== undefined)
+      return this._element;
+
+    this._element = document.createElement('div');
+    var cl = this._element.classList;
+    cl.add('vc-value');
+    if (this.regex())
+      cl.add('regex');
+    
+    this._input = this._element.appendChild(
+      document.createElement('input')
+    );
+    this._input.appendChild(
+      document.createTextNode(this.value())
+    );
+    
+    this._element.appendChild(
+      document.createElement('div')
+    ).addEventListener('click', function (e) {
+      this.toggleRegex();
+    }.bind(this));
+    
+    var go = this._element.appendChild(
+      document.createElement('span')
+    );
+
+    return this._element;
+  }
+});
