function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
meghana kollumeghana kollu 

Hi all,Can any one help me in canvas in visual force page

I had a requirement in vf page ie,
In a page there is a Canvas block if we draw something in that canvas that result should save as image in rich text field. I'm new to Salesforce please help me in detail
​​​​​​

Thanks in advance 
Best Answer chosen by meghana kollu
Raj VakatiRaj Vakati
You need to use  apex:canvasApp Component tag 
<apex:page controller="JSONGeneratorSample">
 <apex:canvasApp developerName="mycanvas" parameters="{!generateJSON}" />
</apex:page>



https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/canvas_framework_using_vf_intro.htm

https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/canvas_app_vf_component_ref.htm
https://dreamevent.secure.force.com/articleView?id=canvas_app_previewer.htm&type=0
https://chintanblog.blogspot.com/2017/11/salesforce-canvas-what-and-how.html

All Answers

Raj VakatiRaj Vakati
You need to use  apex:canvasApp Component tag 
<apex:page controller="JSONGeneratorSample">
 <apex:canvasApp developerName="mycanvas" parameters="{!generateJSON}" />
</apex:page>



https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/canvas_framework_using_vf_intro.htm

https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/canvas_app_vf_component_ref.htm
https://dreamevent.secure.force.com/articleView?id=canvas_app_previewer.htm&type=0
https://chintanblog.blogspot.com/2017/11/salesforce-canvas-what-and-how.html
This was selected as the best answer
Raj VakatiRaj Vakati
https://ccoenraets.github.io/salesforce-developer-advanced/Using-Canvas.html
meghana kollumeghana kollu
Hi Raj,
Other than canvas app is there any another option.
 
Raj VakatiRaj Vakati
You can host your app in heroku or any other hoasting apps .. call that api as Iframe 
 
meghana kollumeghana kollu
ya raj  but i want that in classic also.
actually i wrote a code for canvas but the thing is after entering something how can we save that in rich test field as an image