Giter Club home page Giter Club logo

Comments (5)

givanz avatar givanz commented on May 21, 2024 5

Hi

You can get the whole html by calling Vvveb.Builder.getHtml() if you want to save the html page to a file you can replace Vvveb.Gui.save in builder.js line 1144

	save : function () {
		$('#textarea-modal textarea').val(Vvveb.Builder.getHtml());
		$('#textarea-modal').modal();
	},

to

  	save : function () {
		
		$.ajax({
		  method: "POST",
		  url: "myphp.php",
		  data: { htmlCode: Vvveb.Builder.getHtml()}
		});		
		
	},

and a simple php script to save the contents to a file

<?php
file_put_contents('/path/to/file.html', $_POST['htmlCode']);

If you want to save input values then you need to edit inputs.js and edit Input.Setvalue and add a ajax call

var Input = {
	
	setValue: function(value) {
		$('input', this.element).val(value);

		$.ajax({
		  method: "POST",
		  url: "myphp.php",
		  data: { inputValue: value, inputName:$('input', this.element).attr("name")}
		});	
	},
}

Some inputs override setValue you will need to add a ajax call to those also but default Input covers most of them.

from vvvebjs.

jamesnfl avatar jamesnfl commented on May 21, 2024

That helps!.. thanks a lot.

from vvvebjs.

armghan3071 avatar armghan3071 commented on May 21, 2024

you can create a custom function with can take a parameter for 'CSRF Token' and then pass it.

from vvvebjs.

23naresh avatar 23naresh commented on May 21, 2024

i need to integrate Vvveb builder with laravel please help. already i built a template from scratch i need to integrate with my template

from vvvebjs.

armghan3071 avatar armghan3071 commented on May 21, 2024

i need to integrate Vvveb builder with laravel please help. already i built a template from scratch i need to integrate with my template

Can you share your code here?

from vvvebjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.