Skip to content

Commit 038d6d2

Browse files
authored
Merge pull request UnofficialSF#1659 from Astisme/inputRichTextFSC-readOnly
feat: add read only option Thanks for the enhancement
2 parents aca317b + a69eb0c commit 038d6d2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

flow_screen_components/richTextInputFSC/force-app/main/default/lwc/inputRichTextFSC/inputRichTextFSC.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Start Rich Text Input Section - -->
44
<template if:true={disableAdvancedTools}>
55
<div>
6-
<lightning-input-rich-text value={value} onchange={handleValueChange} formats={formats} label={label} required={required} label-visible=true disabled-categories={disabledCategories}></lightning-input-rich-text>
6+
<lightning-input-rich-text value={value} onchange={handleValueChange} formats={formats} label={label} required={required} label-visible=true disabled-categories={disabledCategories} disabled={readOnly}></lightning-input-rich-text>
77
</div>
88
</template>
99
<!-- End Rich Text Input Section-->
@@ -12,7 +12,7 @@
1212
<template if:false={disableAdvancedTools}>
1313
<div>
1414
<lightning-input-rich-text value={richText} formats={formats} label={label} onchange={handleTextChange}
15-
label-visible=true valid={isValidCheck} message-when-bad-input={errorMessage} required={required} disabled-categories={disabledCategories}>
15+
label-visible=true valid={isValidCheck} message-when-bad-input={errorMessage} required={required} disabled-categories={disabledCategories} disabled={readOnly}>
1616
</lightning-input-rich-text>
1717
</div>
1818
<div class="slds-grid slds-wrap slds-p-around_xx-small slds-m-bottom_x-small lgc-bg">
@@ -69,4 +69,4 @@
6969
</div>
7070
</template>
7171
<!-- End Entry Enhancements -->
72-
</template>
72+
</template>

flow_screen_components/richTextInputFSC/force-app/main/default/lwc/inputRichTextFSC/inputRichTextFSC.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// 04/04/23 Clifford Beul Added disabled categories and optional overwrite of formats
44
// 01/08/24 Declan Toohey Modified character count calculation to not include HTML characters in character count
55
// 14/10/24 Jeroen Burgers Added reactivity
6+
// 28/07/25 Astisme Added Read Only
67

78
import { LightningElement, api, track } from 'lwc';
89

@@ -26,6 +27,7 @@ export default class inputRichTextFSC_LWC extends LightningElement {
2627
@api disallowedSymbolsList;
2728
@api autoReplaceMap;
2829
@api warnOnly = false;
30+
@api readOnly = false;
2931
@api label;
3032
@api characterLimit;
3133
@api required = false;

flow_screen_components/richTextInputFSC/force-app/main/default/lwc/inputRichTextFSC/inputRichTextFSC.js-meta.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<property label="Character Limit" name="characterLimit" type="Integer" role="inputOnly" description="If set, then the character count will be limited to this quantity."/>
2020
<property label="Required?" name="required" type="Boolean" role="inputOnly" default="false" description="Set to True if you want to require an entry for this input."/>
2121
<property label="Exclude HTML in character count?" name="excludeHTMLCharacterCount" type="Boolean" role="inputOnly" default="false" description="Set to True if you want to exclude HTML characters in the character count."/>
22+
<property name="readOnly" type="Boolean" label="Read Only Mode" description="Displays the text in read-only format"/>
2223
</targetConfig>
2324
</targetConfigs>
2425
</LightningComponentBundle>

0 commit comments

Comments
 (0)