Re: [WebDNA] Froala Editor working with WebDNA
This WebDNA talk-list message is from 2016
It keeps the original formatting.
numero = 113256
interpreted = N
texte = 844Hi PalleI had a look at your test page and dragged an image into the text area.Immediately after dragging the image an XHR fired up =(https://www.dropbox.com/s/yfdiqsw3vravfv8/Screen%20Shot%202016-12-20%20at=%2015.07.25.png?dl=3D0 =
). This is where you need to have a WebDNA page =to capture and save the image.I am using a similar system called Redactor to drag & drop images to a =text area =(https://www.dropbox.com/s/n7hfeemss2w4i0j/Screen%20Shot%202016-12-20%20at=%2015.07.08.png?dl=3D0 =), you can see the XHR image-s1.dna file that =fired when I dropped the image in the text area.The image-s1.dna file captures the image, uses imagemagick to resize it, =then moves the image to an Amazon S3 server, deletes the uploaded image =and sends back to redactor JSON data about the file.It looks as if you do not have a file to capture the image data.On line 447 of your rendered code you will find this:// Set the image upload URL.imageUploadURL: '/dev/froala/image=E2=80=99,What you need to do is put a WebDNA file at that location to capture the =file & store it. So set an upload url e.g.:=20// Set the image upload URL.imageUploadURL: '/dev/froala/image/image-capture.dna=E2=80=99,In image-capture.dna put[formvariables][name]:[value][/formvariables]in the page. You will be able to see what data is being passed, then you =just need to handle the data and save the file. I would presume that =Froala will require a response, probably JSON formatted.Here is the contents of my image-s1.dna file: PLEASE NOTE THAT THIS SITE =IS IN A SANDBOX#####################################################[!] -------------- _IMAGE START --------------=20[/!][TEXT]IMAGEFILENAME=3D[/TEXT][!][/!][TEXT]CELLSIZE=3D118[/TEXT][!][/!][TEXT]SHORTPATH=3D../../../imageprocessing/inspirations[/TEXT][!][/!][TEXT]LONGPATH=3D/var/www/imageprocessing/inspirations[/TEXT][!][/!][FORMVARIABLES name=3DFILE&exact=3DF][!][/!][HIDEIF [URL][value][/URL]=3D][!][/!][SHOWIF [url][name][/url]^[url]name=3D"[/url]][!][/!][HIDEIF =[url][name][/url]^[url]filename=3D"[/url]][TEXT show=3DT][MIDDLE =StartAfter=3Dname=3D"&endbefore=3D"][name][/MIDDLE]=3D[value][/TEXT][/HIDE=IF][!][/!][/SHOWIF][!][/!][SHOWIF [url][name][/url]^[url]filename=3D"[/url]][!][/!][TEXT]FULLFILENAME=3D[MIDDLE =StartAfter=3Dfilename=3D"&endbefore=3D"][name][/MIDDLE][/TEXT][!][/!][listwords =words=3D[FULLFILENAME]&delimiters=3D:/\][TEXT]THISIMAGENAME=3D[MATH]{[date=]}[/MATH][MATH]{[time]}[/MATH]-[LOWERCASE][convertchars =db=3D^noillegals.db][word][/convertchars][/LOWERCASE][/TEXT][/listwords][!=]-------------- write the file to upload dir =--------------[/!][HIDEIF [FULLFILENAME]=3D][!]------------------- IMAGEMAGICK =-----------------[/!][WRITEFILE =Secure=3DF&File=3D[SHORTPATH]/[THISIMAGENAME]][value][/WRITEFILE][!]=[/!][TEXT]IMAGEWIDTH=3D[CELLSIZE][/TEXT][!]=[/!][TEXT]IMAGEHEIGHT=3D[CELLSIZE][/TEXT][!][/!][TEXT]IMAGEQUALITY=3D80[/TEXT][!][/!][TEXT]IMAGESWITCH=3D![/TEXT][!] ! =3D =exactly this size=20[/!][TEXT]IMAGEPATH=3D[LONGPATH][/TEXT][!]==[/!][TEXT]IMAGEFILENAME=3D[THISIMAGENAME][/TEXT][!][/!][TEXT]QUIET=3D[SHELL =scriptid=3DT3IMAGERESIZE][/SHELL][/TEXT][!]=09------------------- MOVE THE IMAGES TO =S3 -----------------[/!][LISTFILES path=3D[SHORTPATH]/][!][/!][TEXT]THISS3CMD=3Ds3cmd put =--acl-public /var/www/imageprocessing/inspirations/[FILENAME] =s3://assets.mydomain.com.au/inspirations/ = =--add-header=3DCache-Control:max-age=3D2592000 =--config=3D/usr/lib/cgi-bin/WebCatalogEngine/SandBoxes/MYSANDBOX/Globals/.=awards-s3cfg[/TEXT][!][/!][TEXT]QUIET=3D[SHELL =scriptid=3DAWSS3][/SHELL][/TEXT][!]=09[/!][/LISTFILES][!]------------------- REMOVE ALL FILES =FROM ORIGINALS/THUMBS etc -----------------[/!][LISTFILES =path=3D[SHORTPATH]/][DELETEFILE =file=3D[SHORTPATH]/[FILENAME]][/LISTFILES][!]=09[/!][/HIDEIF][!][/!][/SHOWIF][!][/!][/HIDEIF][!][/!][/FORMVARIABLES][!]=20-------------- TELL REDACTOR THE FILE NAME --------------=20[/!]{ "filelink": ="http://assets.mydomain.com.au/inspirations/[THISIMAGENAME =]=E2=80=9D }#####################################################Kind regardsStuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au
Associated Messages, from the most recent to the oldest:
844Hi PalleI had a look at your test page and dragged an image into the text area.Immediately after dragging the image an XHR fired up =(https://www.dropbox.com/s/yfdiqsw3vravfv8/Screen%20Shot%202016-12-20%20at=%2015.07.25.png?dl=3D0 =). This is where you need to have a WebDNA page =to capture and save the image.I am using a similar system called Redactor to drag & drop images to a =text area =(https://www.dropbox.com/s/n7hfeemss2w4i0j/Screen%20Shot%202016-12-20%20at=%2015.07.08.png?dl=3D0 =), you can see the XHR image-s1.dna file that =fired when I dropped the image in the text area.The image-s1.dna file captures the image, uses imagemagick to resize it, =then moves the image to an Amazon S3 server, deletes the uploaded image =and sends back to redactor JSON data about the file.It looks as if you do not have a file to capture the image data.On line 447 of your rendered code you will find this:// Set the image upload URL.imageUploadURL: '/dev/froala/image=E2=80=99,What you need to do is put a WebDNA file at that location to capture the =file & store it. So set an upload url e.g.:=20// Set the image upload URL.imageUploadURL: '/dev/froala/image/image-capture.dna=E2=80=99,In image-capture.dna put[formvariables][name]:[value][/formvariables]in the page. You will be able to see what data is being passed, then you =just need to handle the data and save the file. I would presume that =Froala will require a response, probably JSON formatted.Here is the contents of my image-s1.dna file: PLEASE NOTE THAT THIS SITE =IS IN A SANDBOX#####################################################[!] -------------- _IMAGE START --------------=20[/!][text]IMAGEFILENAME=3D[/TEXT][!][/!][text]CELLSIZE=3D118[/TEXT][!][/!][text]SHORTPATH=3D../../../imageprocessing/inspirations[/TEXT][!][/!][text]LONGPATH=3D/var/www/imageprocessing/inspirations[/TEXT][!][/!][FORMVARIABLES name=3DFILE&exact=3DF][!][/!][HIDEIF [url][value][/URL]=3D][!][/!][SHOWIF [url][name][/url]^[url]name=3D"[/url]][!][/!][HIDEIF =[url][name][/url]^[url]filename=3D"[/url]][TEXT show=3DT][MIDDLE =StartAfter=3Dname=3D"&endbefore=3D"][name][/MIDDLE]=3D[value][/TEXT][/HIDE=IF][!][/!][/SHOWIF][!][/!][SHOWIF [url][name][/url]^[url]filename=3D"[/url]][!][/!][text]FULLFILENAME=3D[MIDDLE =StartAfter=3Dfilename=3D"&endbefore=3D"][name][/MIDDLE][/TEXT][!][/!][listwords =words=3D[FULLFILENAME]&delimiters=3D:/\][text]THISIMAGENAME=3D[math]{[date=]}[/MATH][math]{[time]}[/MATH]-[lowercase][convertchars =db=3D^noillegals.db][word][/convertchars][/LOWERCASE][/TEXT][/listwords][!=]-------------- write the file to upload dir =--------------[/!][HIDEIF [FULLFILENAME]=3D][!]------------------- IMAGEMAGICK =-----------------[/!][WRITEFILE =Secure=3DF&File=3D[SHORTPATH]/[THISIMAGENAME]][value][/WRITEFILE][!]=[/!][text]IMAGEWIDTH=3D[CELLSIZE][/TEXT][!]=[/!][text]IMAGEHEIGHT=3D[CELLSIZE][/TEXT][!][/!][text]IMAGEQUALITY=3D80[/TEXT][!][/!][text]IMAGESWITCH=3D![/TEXT][!] ! =3D =exactly this size=20[/!][text]IMAGEPATH=3D[LONGPATH][/TEXT][!]==[/!][text]IMAGEFILENAME=3D[THISIMAGENAME][/TEXT][!][/!][text]QUIET=3D[SHELL =scriptid=3DT3IMAGERESIZE][/SHELL][/TEXT][!]=09------------------- MOVE THE IMAGES TO =S3 -----------------[/!][LISTFILES path=3D[SHORTPATH]/][!][/!][text]THISS3CMD=3Ds3cmd put =--acl-public /var/www/imageprocessing/inspirations/[FILENAME] =s3://assets.mydomain.com.au/inspirations/ = =--add-header=3DCache-Control:max-age=3D2592000 =--config=3D/usr/lib/cgi-bin/WebCatalogEngine/SandBoxes/MYSANDBOX/Globals/.=awards-s3cfg[/TEXT][!][/!][text]QUIET=3D[SHELL =scriptid=3DAWSS3][/SHELL][/TEXT][!]=09[/!][/LISTFILES][!]------------------- REMOVE ALL FILES =FROM ORIGINALS/THUMBS etc -----------------[/!][LISTFILES =path=3D[SHORTPATH]/][DELETEFILE =file=3D[SHORTPATH]/[FILENAME]][/LISTFILES][!]=09[/!][/HIDEIF][!][/!][/SHOWIF][!][/!][/HIDEIF][!][/!][/FORMVARIABLES][!]=20-------------- TELL REDACTOR THE FILE NAME --------------=20[/!]{ "filelink": ="http://assets.mydomain.com.au/inspirations/[THISIMAGENAME =]=E2=80=9D }#####################################################Kind regardsStuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au
Stuart Tremain
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
PDF mailing labels (2000)
redirect with frames (1997)
[OT] degree symbol (2003)
Disappearing Databases (2000)
%@#*& back button!!! (1999)
Help name our technology! (1997)
WebDNA on Intel Mac? (2006)
[WriteFile] problems (1997)
can WC render sites out? (1997)
WebCatalog [FoundItems] Problem - LONG - (1997)
IIS4/IIS3 and WebCatalog registry settings (1998)
New NT beta available (1997)
Credit Card Number checking (1997)
RE: Credit card processing - UK (1997)
Merging databases (1997)
Validation (2000)
Include a big block of text (1997)
Claris HomePage messes up the code (1997)
WebCommerce: Folder organization ? (1997)
There's a bug in the math context ... (1997)