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 ...
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 ...
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 ...
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}"/>
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 '...
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.
&...
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">
&...
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">
...
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:
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-...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
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;
}
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 ...
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(...
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:...
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:...
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 ...
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 ...
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 ...
2
votes
Make lightning:inputRichText length longer
This works for me:
.THIS .slds-rich-text-editor {
height: 500px;
}
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 ...
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 ...
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, ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
richtextarea × 161visualforce × 36
apex × 22
images × 17
lightning-aura-components × 14
lightning × 12
javascript × 12
lightning-web-components × 11
html × 10
long-text-area × 10
community × 8
inputrichtext × 8
validation-rule × 6
knowledge × 6
trigger × 5
email × 5
visual-workflow × 5
case × 4
custom-field × 4
formatting × 4
soql × 3
lightning-experience × 3
formula × 3
soap-api × 3
email-template × 3