1

I'm trying to follow the examples provided at https://developer.salesforce.com/docs/component-library/bundle/lightning-input-rich-text/documentation.

The very first example is:

html:

<template>
    <lightning-input-rich-text
        value={myVal}>
    </lightning-input-rich-text>
</template>

javascript:

import { LightningElement } from 'lwc';
export default class RichTextExample extends LightningElement {

    get myVal() {
        return '**Hello!**';
    }
}

When I click on the rendered editor I'm receiving the following errors in the browser developer console (same outcome with Chrome, Firefox and Safari, extensions turned off). Outcome is the same with Debug Mode turned on, tested locally and within Lightning Community. How do I avoid receiving these errors?

richTextExample:19955 Error: [LWC error]: The `innerHTML` property is available only on elements that use the `lwc:dom="manual"` directive.
    at logError (app:710)
    at HTMLDivElement.set [as innerHTML] (app:1476)
    at new Quill (richTextExample:19955)
    at LightningInputRichText.initializeQuill (richTextExample:34944)
    at LightningInputRichText.activateEditor (richTextExample:35167)
    at callHook (app:5697)
    at app:3267
    at runWithBoundaryProtection (app:6223)
    at invokeEventListener (app:3261)
    at app:2561

Error: [LWC error]: The `insertBefore` method is available only on elements that use the `lwc:dom="manual"` directive.
    at logError (app:710)
    at HTMLDivElement.value [as insertBefore] (app:1405)
    at Quill.addContainer (richTextExample:20009)
    at new Quill (richTextExample:19957)
    at LightningInputRichText.initializeQuill (richTextExample:34944)
    at LightningInputRichText.activateEditor (richTextExample:35167)
    at callHook (app:5697)
    at app:3267
    at runWithBoundaryProtection (app:6223)
    at invokeEventListener (app:3261)

richTextExample:20009 Error: [LWC error]: The `insertBefore` method is available only on elements that use the `lwc:dom="manual"` directive.
    at logError (app:710)
    at HTMLDivElement.value [as insertBefore] (app:1405)
    at Quill.addContainer (richTextExample:20009)
    at new Clipboard (richTextExample:29063)
    at Theme.addModule (richTextExample:26152)
    at new Quill (richTextExample:19970)
    at LightningInputRichText.initializeQuill (richTextExample:34944)
    at LightningInputRichText.activateEditor (richTextExample:35167)
    at callHook (app:5697)
    at app:3267
3
  • This might be a silly question but when you say When I click on the rendered editor, what is this? Is that a standard button, or where is it? Dec 4 '20 at 8:53
  • Sorry for not being specific enough - I meant the text area of editor, as in clicking on it to start typing text. However, I have just noticed the errors are thrown also when clicking on the editors toolbar buttons.
    – Chrinov
    Dec 4 '20 at 8:55
  • This I believe is normal, you can ignore those, those errors dont affect functionality. Dec 4 '20 at 9:35
1

This is an issue in the base component implementation, however it's something that you can completely ignore, as it doesn't affect usability. I've made sure it's logged internally though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.