Skip to content

Veebidisainer/surveyjs.editor

 
 

Repository files navigation

survey.js.editor is the visual editor for surveyjs. It uses JSON to store the survey metadata.

Build Status

#Download Dowload the latest version as zip file Download

Install the library using npm.

npm install surveyjs-editor

#Example of using

<div id="surveyjseditor"></div>
<script type="text/javascript">
	var editor = new SurveyEditor.SurveyEditor("surveyjseditor");
	//set the survey json
	editor.text = JSON.stringify({pages:[questions:[{ name: "rateme", type: "rating" }]]});
	// setting saveSurveyFunc will make visible the save button
	// use it to save the survey json as text in your database
	editor.saveSurveyFunc = function() { var myJSONText = editor.text; };
</script>

See the visual editor in action.

##Building surveyjs Editor from sources

To build library yourself:

  1. Clone the repo from GitHub

    git clone https://github.com/andrewtelnov/surveyjs.editor.git
    cd surveyjs.editor
    
  2. Acquire build dependencies. Make sure you have Node.js installed on your workstation.

    npm install -g gulp
    npm install -g typings
    npm install
    

    The first npm command sets up the popular Gulp build tool. The second npm command sets up the Typescript Definition Manager Typings.

  3. Create TypeScript definition files

    typings install
    

    Typescript definition files should be located at 'typings' directory.

  4. Build the library

    gulp makedist
    

    After that you should have the library at 'dist' directory.

  5. Run unit tests

    gulp copyfiles
    gulp test_ci
    

    The first command will copy all required files to 'wwwroot' directory and the last command will run unit tests usign Karma

##Coming features

Find the features under development and Todo list in the Trello board.

#Dependencies The library depends from: surveyjs, knockoutjs, bootstrap and ace editor.

#License

Non-commercial use Commercial use
Noncommercial Please contact me: andrew.telnov at gmail.com

About

surveyjs Editor - visual editor for surveyjs library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 81.8%
  • HTML 13.8%
  • JavaScript 4.0%
  • CSS 0.4%