0.4.2 • Published 7 years ago

marxjs v0.4.2

Weekly downloads
9
License
ISC
Repository
github
Last release
7 years ago

marxjs

Javascript plugin for development and testing HTML forms via populating installed via npm.

Install

Simply install from your terminal:

  $ npm i marxjs --save-dev

or add to your package.json and run npm install:

  // package.json
  {
     "name": "my-app",
     "devDependencies": {
       "marxjs": "^0.4.1"
     }
   }
  $ npm install

Usage

Require the module and instantiate Marx object:

  Marx = require('marxjs');

  new Marx();

That's it! You're now up and running with Marx.js. Running your project in the browser you will see the Marx.js widget in the bottom-right corner. Click the button to open and use it.

Configuring

If you wish to have advanced usage of the Marx.js widget, change the position of the plugin or bind it's functionality to only one specific form, just pass a JavaScript object with the proper key/value pairs (below) to make this happen. Example:

 const Marx = require('marxjs');
 new Marx({
   controls: 'toggle-all',
   position: 'top-right',
   form: '.my-form'
 });

Options

ValueDefaultDescription
controlsstandardselect controls provided by MarxJS. See below for options
formnullcss selector of a specific form in which to effect changes on
positionbottom-righttop-left, top-right, bottom-right, bottom-left
ipsum3default number of paragraphs for the ipsum generator
ipsum-max10maximum paragraphs allowed to generate
onloadfalsehave marx.js fire on page load. options of true, or an array of all or a subset of inputs, textareas, checkboxes, radios, selects

Control Options

ValueDescription
minimumjust the MarxJS button that fills out entire form.
standardgives options for populate whole form or individual form field types.
advancedall standard options and Clear Form, Populate and Submit, Show Hidden Fields, Expand Select Boxes and Generate Ipsum.
toggle-advancedgives both standard and advanced options but hides advanced till you need them
toggle-allprovides buttons to populate whole form, show standard controls and show advanced controls
0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago