Skip to content

Instantly share code, notes, and snippets.

View Frelseren's full-sized avatar

Nikita Verkhoshintcev Frelseren

View GitHub Profile
@Frelseren
Frelseren / DownloadAttachments.cls
Created October 13, 2018 16:09
The Apex class to send out the email with the attachments
global class DownloadAttachments {
/**
* Send out the startup object attachments to the specified email and save it as the activity
* @param {String} startupId The Id of the target startup object, which files we should attach to the email
* @param {String} emailAddress The email address of the recipient
*/
global static void download(String startupId, String emailAddress) {
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
// Set the recipient address
message.setToAddresses(new String[] { emailAddress });
@Frelseren
Frelseren / manifest.json
Created November 9, 2019 22:33
Sample manifest.json file for the lightning container application
{
"landing-pages": [{
"path": "index.html",
"apex-controller": "Namespace.ControllerName"
}]
}
import { api } from 'lwc'
import LightningInputRichText from 'lightning/inputRichText';
export default class CustomInput extends LightningInputRichText {
@api
getContent() {
console.log('get content');
return this.value;
}
import { LightningElement } from 'lwc';
export default class TestRichInput extends LightningElement {
value = `
<table>
<thead>
<tr>
<td>Header 1</td>
<tr>
<tr>
<template>
<!-- <lightning-input-rich-text value={value} onkeydown={handleKeyDown}></lightning-input-rich-text> -->
<c-custom-input value={value} onkeydown={handleKeyDown}></c-custom-input>
</template>
import { LightningElement } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
import { subscribe } from 'lightning/empApi';
export default class CustomDataTable extends NavigationMixin(LightningElement) {
data = [
// data table data
];
columns = [
// other data table column definitions,