Skip to main content
12 votes
Accepted

Lightning component to render a rich text field unescaped

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 ...
Eric's user avatar
  • 54.3k
9 votes
Accepted

Get images from Rich Text Area via APEX

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 ...
Doug Ayers's user avatar
  • 4,206
7 votes
Accepted

Find the word count of a Rich Text Area

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 ...
sfdcfox's user avatar
  • 500k
6 votes

How can I render text as HTML on a page?

Since aura:unescapedHtml introduces the possibility of security vulnerabilities in your code, better solution would be: <lightning:formattedRichText value="{!v.yourHTMLContent}"/>
Piotr Błach's user avatar
6 votes
Accepted

Flow not recognizing enter key/line breaks in long text area field

I think if you put this in a formula in your flow it should work for you: SUBSTITUTE( JSENCODE( {!fieldname} ) , '\r\n', '<br>') The substitute function simply replaces the new line character '...
Kasper's user avatar
  • 2,907
5 votes
Accepted

How to put large inline images into rich text field using content

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. &...
Santanu Boral's user avatar
5 votes

How to enable wrap text in ui:outputRichText?

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"> &...
sfdcfox's user avatar
  • 500k
5 votes
Accepted

How to enable wrap text in ui:outputRichText?

Figured out it needs slds-cell-wrap than slds-wrap because it was used inside a table. That fixed the problem. <div aria-label="" class="slds-rich-text-area__content slds-grow slds-cell-wrap"> ...
Pasan Eeriyagama's user avatar
5 votes
Accepted

Can Tables be Created in a Rich Text Format Field?

You cannot add tables directly in Rich Text Area, however, you can copy and paste them from MS Excel, for example. The result will be like this:
Mariia Illarionova's user avatar
4 votes
Accepted

Rich Text not rendering bullets in Lightning

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-...
Paul Kissick's user avatar
4 votes
Accepted

Rich Text area field

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....
Eric's user avatar
  • 54.3k
4 votes
Accepted

All TextArea replace with the Rich Text

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 ...
sfdcfox's user avatar
  • 500k
4 votes
Accepted

How to wrap Rich Text Area in Visualforce

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 ...
Adrian Larson's user avatar
  • 151k
4 votes

SOQL query to find a row with the longest string in Rich Text Field / Long Text Area Field

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 ...
Mahmood's user avatar
  • 5,976
3 votes

Salesforce Knowledge || Can we use JavaScript or jQuery functions in Text (rich) data type?

No, you can't include JS code in Rich Text Fields. The whole purpose of this field type is to strip out active content such as Javascript. Part of the contract of the Rich Text Field type is that it ...
Robert Sussland's user avatar
3 votes

All TextArea replace with the Rich Text

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 ...
Martin Lezer's user avatar
  • 7,295
3 votes

Make lightning:inputRichText length longer

For LWC, per the documentation, you can add this to your LWC's css file to adjust height, :host { --sds-c-textarea-sizing-min-height: 600px; }
Vince's user avatar
  • 146
3 votes
Accepted

Resizing Images on a Rich Text Field

You can do it with Apex. If you have only 1 image in the text you can use the following sample code. String contactId; Contact c = [ SELECT Id, Picture__c FROM Contact WHERE ...
ytiq's user avatar
  • 4,627
2 votes
Accepted

Validation rule on Rich Text Area field

Wrote a trigger to validate rich text area to check for image or not trigger JobTrigger on Job__c (before update) { for(Job__c j: Trigger.newMap.keySet()){ if((Trigger.oldMap.get(...
sfdc's user avatar
  • 13.7k
2 votes
Accepted

lightning:inputrichtext value can be initialized from init method, but not from different method

Looks like we can override by adding a Renderer file .Here is the code thats working for me <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:...
Mohith Shrivastava's user avatar
2 votes
Accepted

Is it possible to initialize the value in a lightning:inputRichText, like with a lightning:input or ui:inputText?

The below code worked perfectly fine for me <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:...
Mohith Shrivastava's user avatar
2 votes

Accessing an Image from Sites, stored in a Rich Text Area field

I get the answer in this official article . I conclude 3 point : Reason : Images in the rich text area fields are meant to be "Salesforce internally available only" by default. A user from site is ...
Jack's user avatar
  • 21
2 votes
Accepted

Validate if RichText field contains line breaks

Unfortunately through formula, line break in the text cannot be identified. There is a idea Validate line breaks around this. You can vote for this idea. Otherwise, through apex coding you can do ...
Santanu Boral's user avatar
2 votes
Accepted

Make lightning:inputRichText length longer

Yes you can easily do by simply adding a height in lightningInputRichText. when lightning:inputRichText renders on load it have the class with lightningInputRichText and then you can easily override ...
Rishi Golyan's user avatar
2 votes

Make lightning:inputRichText length longer

This works for me: .THIS .slds-rich-text-editor { height: 500px; }
Michele's user avatar
  • 121
2 votes

Custom Quill editor in LockerService not working

To further expand on my comment above, assuming you are are referring to Quilljs, This is specified in a post by @crmprogdev : Important: Libraries that do not support strict mode will not work ...
glls's user avatar
  • 20.3k
2 votes

"Text Area (Rich)" field on Event

From Doc: When creating Custom Fields for Activities, You will find that Rich Text and Long Text Area Fields are not available.This is expected functionality, at this time, you cannot choose ...
Mr.Frodo's user avatar
  • 5,812
2 votes

"Text Area (Rich)" field on Event

Salesforce doesn't allow Long text area and Rich text area fields on Event object. So, you can create a separate object like ActivitySupport and create a Rich text area field in that object. Also, ...
Santanu Boral's user avatar
2 votes
Accepted

Close and reopen VF page

Theoretically you should just need a refresh no? Commit the template value to your record, refresh the page, requery the record, and render the template. Get rid of the re-render altogether and it ...
gNerb's user avatar
  • 9,568
2 votes
Accepted

Issue Sending Image in Rich Text Field in Email through apex

I'm fairly sure that the problem here is that when you try to access the image on the email you are using the Salesforce internal link (the one that requires authentication). When rendering PDFs you ...
Renato Oliveira's user avatar

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