UNPKG

alpaca

Version:

Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide

24 lines (21 loc) 867 B
(function($) { module("fields: wysiwyg"); // Test case 1 : Wysiwyg editor. test("Wysiwyg editor.", function() { stop(); var data = "Ice cream or ice-cream is a frozen dessert usually made from dairy products, such as milk and cream, and often combined with fruits or other ingredients and flavours."; $("#wysiwyg-1").alpaca({ "data": data, "options": { "type": "wysiwyg" }, "postRender": function (renderedField) { expect(2); equal(renderedField.getValue(), data, 'Wysiwyg editor getValue() method returns correct value.'); var inputElem = $('#wysiwyg-1 .wysiwyg'); equal(inputElem.length, 1, 'Wysiwyg editor field generated.'); start(); } }); }); }(jQuery) );