|
1 | 1 | <template> |
2 | | - <template if:true={readOnly}> |
3 | | - <!-- read‑only mode --> |
4 | | - <template if:true={disableAdvancedTools}> |
5 | | - <lightning-formatted-rich-text |
6 | | - value={value} |
7 | | - class="slds-p-around_medium" |
8 | | - ></lightning-formatted-rich-text> |
9 | | - </template> |
10 | | - <template if:false={disableAdvancedTools}> |
11 | | - <lightning-formatted-rich-text |
12 | | - value={richText} |
13 | | - class="slds-p-around_medium" |
14 | | - ></lightning-formatted-rich-text> |
15 | | - </template> |
16 | | - </template> |
17 | | - |
18 | | - <template if:false={readOnly}> |
19 | | - <!-- editable mode --> |
20 | 2 |
|
21 | | - <!-- Start Rich Text Input Section - --> |
22 | | - <template if:true={disableAdvancedTools}> |
23 | | - <div> |
24 | | - <lightning-input-rich-text value={value} onchange={handleValueChange} formats={formats} label={label} required={required} label-visible=true disabled-categories={disabledCategories}></lightning-input-rich-text> |
25 | | - </div> |
26 | | - </template> |
27 | | - <!-- End Rich Text Input Section--> |
| 3 | + <!-- Start Rich Text Input Section - --> |
| 4 | + <template if:true={disableAdvancedTools}> |
| 5 | + <div> |
| 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> |
| 7 | + </div> |
| 8 | + </template> |
| 9 | + <!-- End Rich Text Input Section--> |
28 | 10 |
|
29 | | - <!-- Start Entry Enhancements - only display if enableAdvancedTools activated --> |
30 | | - <template if:false={disableAdvancedTools}> |
31 | | - <div> |
32 | | - <lightning-input-rich-text value={richText} formats={formats} label={label} onchange={handleTextChange} |
33 | | - label-visible=true valid={isValidCheck} message-when-bad-input={errorMessage} required={required} disabled-categories={disabledCategories}> |
34 | | - </lightning-input-rich-text> |
35 | | - </div> |
36 | | - <div class="slds-grid slds-wrap slds-p-around_xx-small slds-m-bottom_x-small lgc-bg"> |
37 | | - <lightning-button-group> |
| 11 | + <!-- Start Entry Enhancements - only display if enableAdvancedTools activated --> |
| 12 | + <template if:false={disableAdvancedTools}> |
| 13 | + <div> |
| 14 | + <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} disabled={readOnly}> |
| 16 | + </lightning-input-rich-text> |
| 17 | + </div> |
| 18 | + <div class="slds-grid slds-wrap slds-p-around_xx-small slds-m-bottom_x-small lgc-bg"> |
| 19 | + <lightning-button-group> |
| 20 | + <div class="slds-p-around_xxx-small"> |
| 21 | + <lightning-button-icon variant="border-filled" size="medium" icon-name="utility:search" |
| 22 | + onclick={handleOpenSearch} alternative-text="Open Search and Replace" |
| 23 | + tooltip="Open Search and Replace"> |
| 24 | + </lightning-button-icon> |
| 25 | + </div> |
| 26 | + <template if:true={searchButton}> |
38 | 27 | <div class="slds-p-around_xxx-small"> |
39 | | - <lightning-button-icon variant="border-filled" size="medium" icon-name="utility:search" |
40 | | - onclick={handleOpenSearch} alternative-text="Open Search and Replace" |
41 | | - tooltip="Open Search and Replace"> |
| 28 | + <lightning-input type="text" placeholder="Search Text" variant="label-hidden" |
| 29 | + value={searchTerm} onchange={handleSearchChange}></lightning-input> |
| 30 | + </div> |
| 31 | + <div class="slds-p-around_xxx-small"> |
| 32 | + <lightning-input type="text" placeholder="Replace with Text" variant="label-hidden" |
| 33 | + value={replaceValue} onchange={handleReplaceChange}></lightning-input> |
| 34 | + </div> |
| 35 | + <div class="slds-p-left_xxx-small slds-p-right_small slds-p-top_xxx-small slds-p-bottom_xxx-small"> |
| 36 | + <lightning-button-icon variant="brand" size="medium" icon-name="utility:check" |
| 37 | + onclick={searchReplace} alternative-text="Search and Replace" tooltip="Search and Replace"> |
42 | 38 | </lightning-button-icon> |
43 | 39 | </div> |
44 | | - <template if:true={searchButton}> |
45 | | - <div class="slds-p-around_xxx-small"> |
46 | | - <lightning-input type="text" placeholder="Search Text" variant="label-hidden" |
47 | | - value={searchTerm} onchange={handleSearchChange}></lightning-input> |
48 | | - </div> |
49 | | - <div class="slds-p-around_xxx-small"> |
50 | | - <lightning-input type="text" placeholder="Replace with Text" variant="label-hidden" |
51 | | - value={replaceValue} onchange={handleReplaceChange}></lightning-input> |
52 | | - </div> |
53 | | - <div class="slds-p-left_xxx-small slds-p-right_small slds-p-top_xxx-small slds-p-bottom_xxx-small"> |
54 | | - <lightning-button-icon variant="brand" size="medium" icon-name="utility:check" |
55 | | - onclick={searchReplace} alternative-text="Search and Replace" tooltip="Search and Replace"> |
56 | | - </lightning-button-icon> |
57 | | - </div> |
58 | | - </template> |
59 | | - <template if:true={autoReplaceEnabled}> |
60 | | - <div class="slds-p-around_xxx-small"> |
61 | | - <lightning-button-icon variant="border-filled" size="medium" icon-name="utility:merge" |
62 | | - onclick={applySuggested} alternative-text="Apply Suggested Terms" tooltip="Apply Suggested Terms"> |
63 | | - </lightning-button-icon> |
64 | | - </div> |
65 | | - </template> |
66 | | - <template if:true={dirty}> |
67 | | - <div class="slds-p-around_xxx-small"> |
68 | | - <lightning-button-icon variant="border-filled" size="medium" icon-name="utility:undo" |
69 | | - onclick={handleRevert} alternative-text="Undo Last Change" tooltip="Undo Last Change"> |
70 | | - </lightning-button-icon> |
71 | | - </div> |
72 | | - </template> |
73 | | - <!--<template if:false={characterCap}> |
74 | | - <div class="slds-p-left_x-small slds-p-right_xxx-small slds-p-top_x-small slds-p-bottom_xxx-small"> |
75 | | - <p>{characterCount}</p> |
76 | | - </div> |
77 | | - </template>--> |
78 | | - <template if:true={characterCap}> |
79 | | - <div class="slds-p-left_x-small slds-p-right_xxx-small slds-p-top_x-small slds-p-bottom_xxx-small"> |
80 | | - <p class={charClass}>{characterCount}/{characterLimit}</p> |
81 | | - </div> |
82 | | - </template> |
83 | | - <div class="slds-p-left_x-small slds-p-right_xxx-small slds-p-top_xx-small slds-p-bottom_xxx-small"> |
84 | | - <lightning-helptext content={instructions}></lightning-helptext> |
| 40 | + </template> |
| 41 | + <template if:true={autoReplaceEnabled}> |
| 42 | + <div class="slds-p-around_xxx-small"> |
| 43 | + <lightning-button-icon variant="border-filled" size="medium" icon-name="utility:merge" |
| 44 | + onclick={applySuggested} alternative-text="Apply Suggested Terms" tooltip="Apply Suggested Terms"> |
| 45 | + </lightning-button-icon> |
| 46 | + </div> |
| 47 | + </template> |
| 48 | + <template if:true={dirty}> |
| 49 | + <div class="slds-p-around_xxx-small"> |
| 50 | + <lightning-button-icon variant="border-filled" size="medium" icon-name="utility:undo" |
| 51 | + onclick={handleRevert} alternative-text="Undo Last Change" tooltip="Undo Last Change"> |
| 52 | + </lightning-button-icon> |
| 53 | + </div> |
| 54 | + </template> |
| 55 | + <!--<template if:false={characterCap}> |
| 56 | + <div class="slds-p-left_x-small slds-p-right_xxx-small slds-p-top_x-small slds-p-bottom_xxx-small"> |
| 57 | + <p>{characterCount}</p> |
| 58 | + </div> |
| 59 | + </template>--> |
| 60 | + <template if:true={characterCap}> |
| 61 | + <div class="slds-p-left_x-small slds-p-right_xxx-small slds-p-top_x-small slds-p-bottom_xxx-small"> |
| 62 | + <p class={charClass}>{characterCount}/{characterLimit}</p> |
85 | 63 | </div> |
86 | | - </lightning-button-group> |
87 | | - </div> |
88 | | - </template> |
89 | | - <!-- End Entry Enhancements --> |
| 64 | + </template> |
| 65 | + <div class="slds-p-left_x-small slds-p-right_xxx-small slds-p-top_xx-small slds-p-bottom_xxx-small"> |
| 66 | + <lightning-helptext content={instructions}></lightning-helptext> |
| 67 | + </div> |
| 68 | + </lightning-button-group> |
| 69 | + </div> |
90 | 70 | </template> |
| 71 | + <!-- End Entry Enhancements --> |
91 | 72 | </template> |
0 commit comments