Harsh kumar
IndividualForum Replies Created
-
Harsh
MemberMay 2, 2018 at 1:21 pm in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?integrate the image in the rich text.
with the help of and
i am sending the screen shot of my visual force page************************************************************************************************************
-
Harsh
MemberApril 30, 2018 at 1:06 pm in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?I am using the tag <apex:inputtextarea>’ in my visual force page were 'richtext'=true now i am using this editor for image were when user attach any attachment using the upload file that this image should sucessfully upload in the editor provide by <apex:inputtextarea>
To upload the image i am using the <apex:image> with properties url='https://www.forcetalks.com/salesforce-topic'
As user upload the image with this url i want to integerate with the <apex:inputtextarea> so that user can able to see image in the editor.
-
Harsh
MemberApril 30, 2018 at 4:39 am in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?My use case- In my visual force page I have two tag <apex:inputtextarea > where richtext=true and other is the <apex:image url="https://www.forcetalks.com/salesforce-topic/"> tag were I have image file I need to integrate into one that is in <apex:inputtextarea>
Please suggest me any idea of solving this issue. -
Harsh
MemberApril 20, 2018 at 8:11 am in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?Aman
Any solution to this issue or any work around you have find out.
Please share with me, as it is priority issue for ticket.
- This reply was modified 6 years, 7 months ago by Harsh.
-
Harsh
MemberApril 19, 2018 at 11:59 am in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?Thanks Aman
Any solution to this issue or any work around.
- This reply was modified 6 years, 7 months ago by Harsh.
-
Harsh
MemberApril 19, 2018 at 9:26 am in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?public class ContentController {
public SObject record {get; private set;}
public ContentController() {}
public Event myStandardObject;
public ContentController(ApexPages.StandardController controller) {
myStandardObject = (Event)controller.getRecord();
record = (Event)controller.getRecord();
}public blob file { get; set; }
public PageReference upload() {
// String encodedContentsString = System.currentPageReference().getParameters().get('fileContents');
ContentVersion v = new ContentVersion();
v.versionData = file;
v.title = 'testing upload';
v.pathOnClient ='/somepath.txt';
insert v;
Event thisMatter = [select id from event where Id = :ApexPages.currentPage().getParameters().get('id')];
ContentVersion contentVersion_2 = [SELECT Id, Title, ContentDocumentId FROM ContentVersion WHERE Id = :v.Id LIMIT 1];
List<ContentDocument> documents = [SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument];ContentDocumentLink contentlink = new ContentDocumentLink();
contentlink.LinkedEntityId = thisMatter.id;
contentlink.contentdocumentid = contentVersion_2.contentdocumentid;
contentlink.ShareType = 'V';
insert contentlink;// myStandardObject.id=v.id;
// insert myStandardObject;
return new PageReference('/' + thisMatter.id);
}
} -
Harsh
MemberApril 19, 2018 at 8:25 am in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?I have made as per your suggestion but still it is not working
<apex:page standardcontroller=”Event” extensions=”ContentController” sidebar=”False” showHeader=”False”>
<apex:form >
<apex:pageBlock >
<apex:inputTextarea rows="10" cols="177" richText="True" value="{!Event.Description}" onChange="numCheck();" id="UploadImage" />
<script type="text/JavaScript">
function numCheck()
{
alert(document.getElementById("UploadImage").style.display = "block");
}
</script><apex:commandButton value="Save" action="{!save}" />
</apex:pageBlock>
<apex:inputFile value="{!file}" />
<apex:commandbutton action="{!upload}" value="Upload" />
</apex:form>
</apex:page> -
Harsh
MemberApril 19, 2018 at 8:09 am in reply to: How to hide "display:none" in html tag on a Visualforce Page Component?<apex:page standardcontroller="Event" extensions="ContentController" sidebar="False" showHeader="False">
<apex:form >
<apex:pageBlock >
<apex:inputTextarea rows="10" cols="177" richText="True" value="{!Event.Description}" style="display:block"/><apex:commandButton value="Save" action="{!save}" />
</apex:pageBlock>
<apex:inputFile value="{!file}" />
<apex:commandbutton action="{!upload}" value="Upload" />
</apex:form>
</apex:page>Can u suggest me in my above code were i should write the display: none;
as i am new in java script.
-
Harsh
MemberApril 18, 2018 at 12:51 pm in reply to: How can i add the ability to upload image using richtext in inputTextArea?Hi Pranav,
Thanks for the code, but can u please implement the same in event object as i am getting it some error when i tried to implement this code in my org.
-
Harsh
MemberApril 18, 2018 at 11:10 am in reply to: How can i add the ability to upload image using richtext in inputTextArea? -
On Event object their is no rich text area, so user wanted to have the rich text area, i have created the visual force page and add in the page layout of event.
I have also add the trigger on event object so when user make any changes in that visual force page than it will save in the attachment as a file text or a image jpg .
The issue is whenever user make any changes in the rich text area. than every time it is creating the new file and attached in the section, but this need to be stop and only one time it should added and next time they need to update than attachment.
Hint-
1. Either my removing the file
2. Deleting the file