Skip to main content
I'm trying to do a simple LWC that is basically a wrapper for the lightning-input-rich-text. What I am finding is that on load, the text is not applied until I click into the text area. 

.js file 

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

export default class RichTextExample extends LightningElement {

@api label

@api placeholder

@api variant

@api auraId

@api value

@api valid

@api blur

formats=['size', 'bold', 'italic', 'underline',

'strike', 'list', 'indent', 'align',

'clean', 'table', 'header', 'color',

'code', 'code-block','script', 'link', 'blockquote', 'background'];

}

.html

<template>

<lightning-input-rich-text

aura:id={auraId}

label={label}

value={value}

placeholder={placeholder}

valid={valid}

onblur={blur}

formats={formats}

variant={variant}

>

</lightning-input-rich-text>

</template>

Passing data to LWC from my Aura Component: 

<c:testRichTextEditor aura:id="description"

label="Description"

value=""

placeholder="Enter the full description of the issue."

valid="{!v.description_valid}"

blur="{!c.handleDescriptionBlur}"

variant="bottom-toolbar"

></c:testRichTextEditor>

The it looks like formats, variant do render on page load, but the Placeholder, label, and value do until I click on the text area. 

On Page Load:

LWC- passing static data to a LWC (lightning-input-rich-text) not populating on load. Passing strings from Aura Comp to LWCAfter clicking text area:

Lightning Web Component Rich Text Editor on page load with placeholder after interacting with text area

 
2 respuestas
  1. 30 oct 2024, 04:41

    Hi everyone,  

    I have a query about static value calculation in HTML.  

    class="amntWidth-150 paddbor">0  

    class="countWidth-118 paddbor">194  

    class="avrgSizeWidth-150 paddbor">237,239.48  

    These are my values in HTML. I want another similar value. and I want to show this total each separately and show on separate columns how can we do, please 

0/9000