waynegm / imgNotes

Extension of the jQuery imgViewer plugin to add markers and notes to the image
MIT License
99 stars 26 forks source link

Note Editor - Form #49

Closed waroi closed 4 years ago

waroi commented 5 years ago

Using the plugin, I want to create a form like the picture in the link I have posted and use the data from that form instead of the note editor. I wonder how can I do it?

https://i.hizliresim.com/kM8XD7.png

waynegm commented 5 years ago

Your image link gives me a 403 error. Without knowing what was in the image I think it should be possible for you to extend the plugin to collect more than just text data and display the results either as a tooltip or in a dialog box. The basic editor example essentially creates a dialog box form with a single textarea field within the onEdit callback but there is nothing to stop you adding more form elements and on save instead of putting text into the note variable put a JSON object. Your will also have to add custom onShow and maybe an onAdd callback to handle display of the JSON blob in the note data see basic dialog viewer example.

If required you can send the input data back to the server by whatever method you like either as part of the "Save" function in the onEdit callback or in response to a Submit button. I think the "export " method of the plugin should continue to work if the note data is a JSON object instead of text.