I can initialize the value of a lightning:input
by doing this:
Component:
<lightning:input aura:id="subject" type="text" label="Subject" name="subject" />
Controller:
component.find("subject").set("v.value", "Hello!");
Result:
However, with lightning:inputRichText
, when I follow the same pattern, the UI does not show the value, but if I alert(component.find("body").get("v.value"))
, it shows the expected value.
Component:
<lightning:inputRichText aura:id="body" />
Controller:
component.find("body").set("v.value", "<p>This will be init properly once I switch to ContentNote</p>");
Result:
Can anyone point me in the right direction with this? At the moment, the component documentation doesn't have anything relevant besides listing value
as an attribute.