Issue #1487Opened October 8, 2018by Skovmissen0 reactions

Load from Database

Question

Code SnippetTEXT
I've got an issue with loading the lory-slider from my mysql db. When i load it back in, the functionality is gone, i cant slide left or right.
here is my save code:
` var cmdm = editor.Commands;
cmdm.add('save-db', {
  run: function (em, sender) {
    
    
    sender.set('active', true);
    //get full HTML structure after design
    //var InnerHtml = this.frameEl.contentDocument.activeElement.innerHTML;
    var InnerHtml = editor.getHtml();
	var css = editor.getCss();
	console.log(editor);
    //set post to save all HTML structure after design to DB
    $.post("savetoDB.asp", { html: InnerHtml, css: css  }, function (result) {
		console.log("Saved to db");
      sender.set('active', false);
    }).fail(function(fail){
		console.log(fail.responseText);
		 sender.set('active', false);
	});  }}); 

and load which is converted from string to JSON format, im using asp classic so thats why its looking a bit weird:

`response.write "{""gjs-css"":""" & css &""", ""gjs-html"":"""&""& html&""&"""}"`

What i can see is that the data-gjs-type is sat to default on load, where as a new slider have data-gjs-type = "lory-slider"

Answers (3)

SkovmissenOctober 9, 20180 reactions

@artf Im stuck could you maybe help me out?

SkovmissenOctober 12, 20180 reactions

Thanks i solved it.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.