5
Yes you should be able to do this by wrapping up the LWC base component in a custom LWC Component. You can use custom LWC component in an Aura Component. Use this link to understand how to use custom LWC in aura component: https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.interop_aura_composition
This way you should be able to use ...
3
In Aura you write with Aura syntax, so you reference the components the same way you have always done in Aura regardless of what type of component it is (Aura or LWC)
<aura:component>
<lightning:button/>
<c:myFancyComponent/>
</aura:component>
Note that in the example above either component can be implemented in Aura or LWC and ...
2
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:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<lightning:button label="Set ...
answered Mar 23 '17 at 15:55
Mohith Shrivastava
77k1212 gold badges124124 silver badges172172 bronze badges
2
The below code worked perfectly fine for me
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<lightning:...
answered Mar 23 '17 at 2:58
Mohith Shrivastava
77k1212 gold badges124124 silver badges172172 bronze badges
1
The value attribute should contain the HTML:
JS:
import { LightningElement, track} from 'lwc';
export default class testLwc extends LightningElement {
@track htmlValue;
handleChange(event) {
console.log(event.target.value);
}
}
Template
<template>
<lightning-input-rich-text
value={htmlValue}
onchange={...
1
Yes it can be targeted in the css file. Lightning components such as lightning:inputRichText generate their own HTML that will have to be targeted. The following will work with your provided class:
.THIS .canEnter .ql-editor.slds-rich-text-area__content {
min-height:14rem;
}
1
You can change height using CSS for lightningInputRichText control
.THIS .slds-rich-text-editor__textarea{
height: 14em;
}
1
Sorry this is currently not supported. Only String, Integer and Boolean are supported, where Strings can have a datasource that will present as a picklist.
Reference: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_design_files.htm
1
As we cannot add onKeyUp Listener on lightning:inputRichText , we will add a listener to commentBody attribute in the markup. We can do that using aura:valueChange
Markup:
<aura:attribute name="commentBody" type="String"></aura:attribute>
<aura:handler name="change" value="{!v.commentBody}" action="{!c.itemsChange}"/>
<div class="...
answered Jan 31 '19 at 11:04
Pranay Jaiswal
31.9k77 gold badges5353 silver badges105105 bronze badges
1
You should be able to get the value of the lightning:inputRichText
And then find it's length:
let value = cmp.find('inputRichTextId').get("v.value");
let characterCount = value.length;
1
I believe it is not possible because you need to get hold of the cursor position of the lightning:inputRichText which is not exposed either by attribute or by action as of now, also it's part of lightning namespace so you cannot read the DOM due to Locker Service.
If you are using HTML textarea tag (need to manually do the data binding stuffs), then you ...
1
When you use an <apex:... id="..."> component, the id value gets prefixed. The simplest fix is to use the "ends with" ($=) selector:
var input = $("[id$='notes']");
var notFound = $("#notes"); // this value is not the literal id
See also:
Best Practices for Accessing Component IDs
Using $Component to Reference Components from JavaScript
$Component
answered May 22 '17 at 15:56
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
inputrichtext × 18lightning-aura-components × 9
lightning × 8
richtextarea × 6
aura × 4
visualforce × 2
javascript × 2
lightning-web-components × 2
apex × 1
email × 1
salesforce1-app × 1
jquery × 1
css × 1
attachment × 1
html × 1
javascript-controller × 1
feeditem × 1
visual-flows × 1
lightninginput × 1
default-value × 1
template × 1
null × 1
outputfield × 1
blob.topdf × 1
line-break × 1