Esri / geoform-template-js

GeoForm is a configurable template for form based data editing of a Feature Service.
http://esri.github.io/geoform-template-js/
Apache License 2.0
67 stars 83 forks source link

When I copy and paste HTML code into the Details page - every time I hit Preview or Publish, it duplicates the entry. #460

Closed pjdohertygis closed 9 years ago

pjdohertygis commented 9 years ago

I followed the steps for embedded a Google Translate toolbar on my app. Link: https://translate.google.com/manager/website/suggestions

image

All I did was -

1) Paste it into the Details Form and Instructions "Code-View" 2) Justified the bar to the right 3) Hit Preview 4) Change something else 5) Hit Preview or Publish again

I end up with a duplicate bar on my app and duplicate HTML in the Code-View.

pjdohertygis commented 9 years ago

Here here is a screenshot screenshot : )

image

driskull commented 9 years ago

@pjdohertygis I don't think this will work correctly when put in here. Part of it is supposed to go into the head of the document and the other in the body. You would probably need to put it in the index.html file and host the app yourself for this to work correctly.

I'll look into it though.

pjdohertygis commented 9 years ago

Actually - it seems to be working. Give it a try! http://pjdohertymaps.maps.arcgis.com/apps/GeoForm/index.html?appid=630c8f4e8d634dd9a75c423338cbd86d

However - if I save and publish or preview - it duplicates the code : (

On Wed, Apr 22, 2015 at 12:25 PM, Matt Driscoll notifications@github.com wrote:

@pjdohertygis https://github.com/pjdohertygis I don't think this will work correctly when put in here. Part of it is supposed to go into the head of the document and the other in the body. You would probably need to put it in the index.html file and host the app yourself for this to work correctly.

I'll look into it though.

— Reply to this email directly or view it on GitHub https://github.com/Esri/geoform-template-js/issues/460#issuecomment-95255059 .

driskull commented 9 years ago

The issue is with summernote handling the JavaScript. although its also a problem with the google script.

When the script is being run, it's creating another HTML element.

Same thing happens here: http://summernote.org/#/

When the html button is closed, the script is ran and another element is created.