10

Did you try <ui:outputRichText aura:id="outputRT" value="{!v.chatterPost.Body}" /> Which would result in the proper output I believe they way you are doing it, is the final output of the ui component but with the escaped version of the value. You could also do <div class="uiOutputRichText" linkify="true" > <aura:unescapedHtml value="{...


8

Are you sure the rich text field is visible to the site profile? It's not included in the regular list, you have to go to the site settings and access the profile from there where you can then check whether the field level security is good. I assume it is since you have the URL , but then I don't know why you can't access the image. Have you tried using ...


8

To output pre-formatted HTML, use aura:unescapedHTML. You can pass in values from a controller, such as: <aura:unescapedHtml value="{!v.note.body}"/>


7

You can expose the image through a site. You only need to change the instance url by the site home page. Also, you need to establish the article as public. Site Profile Changes: Set field where image is placed as visible. Set Read permission to object where image is placed. Go to "Category Group Visibility Settings" section and set visibility to "All ...


7

You can't reliably use LTA, RTA, or ETA fields (Long, Rich, Encrypted) in formulas, but you can in Apex Code. My solution would be simply: trigger CheckWorkCount on SObject (before insert, before update) { for(SObject record: Trigger.new) { Integer count; if(record.RTA__c != null && (count = record.RTA__c ....


6

eid is a custom object, the "entity ID". Presumably, you could use this to view an instance of your record. feoid is the "field entity ID". This describes the field that the content is stored in. You can see this value when you're looking at the field in the Setup screen. refid is an ID of the type ContentReference. We're not able to describe this object, ...


6

Per doc: https://help.salesforce.com/HTViewHelpDoc?id=fields_using_rich_text_area.htm&language=en_US HTML code is not supported in the Salesforce HTML editor. HTML code is treated as text. Using a Long Text Area field with <apex:outputText value="{!Information.LongTextField__c}" escape="false"/> works.


6

If you just change the Field Type from Rich Text to Long Text, Salesforce will take care of stripping out HTML tags while converting line breaks into new lines. Just go to Setup and find your field, then click "Change Field Type". When you select "Text Area (Long)", Salesforce will present a "Field Conversion" screen which asks you what you want to do with ...


5

Short answer: no. Long answer: It's not easy, but it is possible, if you're willing to work for it, and accept the limitations that would arise from such a hack. There are two basic ways to accomplish this goal. Solution # 1 The first way would be to write an extension for salesforce. This is browser specific, and has to be installed in each browser ...


5

Where did you get your accessToken from? If you used OAuth to establish the session then you will need to have the web OAuth scope to use the sessionid for what is essentially a screen scraping web request. Having the api scope would be sufficient for the Partner API, but for for mocking UI requests. Other than that, as you have found, you need to put the ...


5

Rich fields are stored as HTML in Salesforce, so to retrieve your image, you will have to parse the text and get the image from there. Luckily this is a fairly simple task to do. Once queried, the field will look like this in the variable: What you want is what is in the src attribute of the img tag. You can just copy the tag, or get the link and remake it ...


5

When a user uploads images in RichTextArea field salesforce creates this kind of link and ContentReference is maintained by Salesforce internally, which is not accessible by an user using the refid. <img src="https://c.{instance}.content.force.com/servlet/rtaImage?eid=a0yxxxxx&amp;feoid=00Nxxxx&amp;refid=0EMxxxxx" alt="Inline images 1" width="478"...


4

Rich text fields store HTML in the backend, so if you save in some relevant HTML that includes some div/spans with some CSS in style attributes you should see the colours on screen. e.g. store the following HTML into a rich text field (written in via code or some other means, not in the editor itself). <span style="display: inline-block; background-...


4

Looks like ImageUpload__c is rich text area then don't use apex:image for ImageUpload__c field Instead use apex:outputField <apex:outputField value="{!a.ImageUpload__c}"/> This will display your rich text area image. when we use apex:outputField salssforce in there end use as richTextArea field.


4

You need to set your white-space style to pre-wrap. Take a look at the CSS white-space Property: normal Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default nowrap Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on ...


4

The Id of an apex:inputTextArea is modified by the runtime system that guarantees it will be unique on the page. As a side effect, this means you can't generally use those Id values without some extra effort, such as using $Component. Fortunately, CKEditor.replace supports using an element instead, so this should probably work: function ReloadCKEditor() { ...


4

You might want to add the slds-text-longform class to the p tag, e.g. <aura:iteration items="{!alert.value.relatedrecords}" var="rec"> <dd class="slds-tile"> <p class="slds-text-longform tile__title red-txt"> <aura:unescapedHtml value="{!rec.Message__c}"/> </p> </dd> </aura:...


4

You shouldn't do anything special at all. It works correctly as is without any other wrappers. Here's a very basic example I wrote up. Application <aura:application extends="force:slds"> <aura:attribute name="richText" type="String" /> <aura:handler name="init" value="{!this}" action="{!c.init}" /> <p>This is just some ...


4

You can't filter or SOQL on Long-text area/rich text fields. You can upvote on the idea here. You can't use Long-text area/rich text fields in formula either, another idea is here for you to upvote if you so desire. Workaround You can create a trigger on your object, that has this long-text area field, and use the before insert / before update event. And ...


3

I just discovered a work around for this here. Create a Formula field that uses the LEFT formula and filter on that. You cannot filter on the ENTIRE long text but you can filter on part of it: Legal_Street__c is a long text area. I created a formula field call StreetConc__c: LEFT(Legal_Street__c, 40) I then created a dummy record and put the text '...


3

Try using <apex:outputField> instead of <apex:outPutText> and see if that solves your issue. You could also wrap this in an Table and TD


3

Since aura:unescapedHtml introduces the possibility of security vulnerabilities in your code, better solution would be: <lightning:formattedRichText value="{!v.yourHTMLContent}"/>


3

You can with quite a lot of work. First you will need to parse the text to find the <img> elements and in particular the src attribute of those. (Use e.g. the DOM classes.) Then use some code that looks like this for each src attribute (I've hard coded and truncated one here): // This location is an example from my org; will need to be different for ...


3

As of Spring '17 release, I could not get Keith's solution to work for me by making Http Callouts. Yes, the callout occurred, but the data I got back after following the 302 redirect sent back a web page wanting me to log in. Even after trying to set the request's Authorization header as discussed in the comments, no luck for me. However, I did find similar ...


3

I'm afraid that rich text area simply doesn't care about file name. Also I can see only one advantage of using this field - it's can display image at your page layout. If I'm right, you can store your files in attachments and display them in your rich text. In the following example trigger for attachment checks if its our sObject type and then updates ...


3

Help docs seem to answer all your questions: The maximum size of an image that can be uploaded in a rich text area field is 1 MB. Only .gif, .jpg, and .png file types are supported. https://help.salesforce.com/HTViewHelpDoc?id=fields_using_rich_text_area.htm Images within the rich text area fields count towards file storage for the object that ...


3

First, you are loading the CKEditor script in a wrong place. You must load it at the start of your VF page. Then, the id you put on your apex:inputTextArea is not the one generated by Salesforce at the page rendered. You will have to request by using the class of the input, then by sending its id to the plugin using the jquery attr() method. Here's the ...


2

I faced same issue and after spending some time on various blogs and communities, i found solution. To Access RTA image on site we need to tweak the url which we get while accessing RT field in Apex URL in Apex: https://c.cs17.content.force.com/servlet/rtaImage?eid=a1Cg0000000JDAi&feoid=00Ng0000000MTcp&refid=0EMg00000007o4U URL to access RTA ...


2

Well its in the salesforce doc! Have a look here http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputTextarea.htm According to the doc "rows" : "Integer" : The height of the text area, as expressed by the number of rows that can display at a time. "cols": "Integer" : The width of the field, as expressed by the number of ...


2

In your code instead of columns= "4" use "1" then no need to apply styles also


Only top voted, non community-wiki answers of a minimum length are eligible