I am beginner in asp.net core 2.2 using razor pages.
I'd like to know how can i create a form where user can write a text then add image at cursor position then he can continue to write his text and add another image.
It is something like in writing and add image in a word document.
What you are asking can only be written in JavaScript. It would also require advanced browser dom understanding, and advanced JavaScript. As suggested you would be better off you an existing JavaScript based editor.
Note: after picking the library, for image support, you will need to write server code based on the libraries requirements.
None
0 Points
14 Posts
How to add image at mouse cursor position in a user form
Sep 17, 2019 04:28 PM|marco1892|LINK
Hello,
I am beginner in asp.net core 2.2 using razor pages.
I'd like to know how can i create a form where user can write a text then add image at cursor position then he can continue to write his text and add another image.
It is something like in writing and add image in a word document.
Thanks in advance for any help or suggestion.
All-Star
48280 Points
17983 Posts
Re: How to add image at mouse cursor position in a user form
Sep 17, 2019 05:12 PM|PatriceSc|LINK
Hi,
The basic idea is to use https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content which allows to allow editing a part of an HTML page. You'll find many "rich text editors" using this as the basis to create https://en.wikipedia.org/wiki/Online_rich-text_editor which list some of the most popular options.
This particular point is basically unrelated to what you are using on the server side.
All-Star
57864 Points
15491 Posts
Re: How to add image at mouse cursor position in a user form
Sep 18, 2019 12:55 AM|bruce (sqlwork.com)|LINK
Note: after picking the library, for image support, you will need to write server code based on the libraries requirements.
None
0 Points
14 Posts
Re: How to add image at mouse cursor position in a user form
Sep 18, 2019 01:22 AM|marco1892|LINK
Thank you PatriceSC for your reply i'll see the links and i'll try to achieve this. Thank you again !
None
0 Points
14 Posts
Re: How to add image at mouse cursor position in a user form
Sep 18, 2019 01:24 AM|marco1892|LINK
Thank you Bruce, any suggestion for me is welcome and i'll take your suggestion in consideration. Thank you !