Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'insertBefore' of null #481

Open
AliEasy opened this issue Dec 18, 2023 · 2 comments
Open

Uncaught TypeError: Cannot read property 'insertBefore' of null #481

AliEasy opened this issue Dec 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@AliEasy
Copy link

AliEasy commented Dec 18, 2023

Describe the bug
By using below code make text rtl according to this link

_bodyController.editorController!.evaluateJavascript(
                    source: "\$('div.note-editable').attr('dir', 'rtl');");

after using controller.insertText('sth') below error occurs:
Uncaught TypeError: Cannot read property 'insertBefore' of null

To Reproduce
1- Add below code to HtmlEditor:

callbacks: Callbacks(
              onInit: () {
                _bodyController.editorController!.evaluateJavascript(
                    source: "\$('div.note-editable').attr('dir', 'rtl');");
              },
            ),

2- Use blow code to add some text at button onPressed():
controller.insertText('[#نام شرکت#]');
3- Click on button multi times

@AliEasy AliEasy added the bug Something isn't working label Dec 18, 2023
@vadrian89
Copy link

Since the editor wasn't updated in a while, I think it's related to: summernote/summernote#3257

I am working on an update for the package, but since the original developer doesn't seem to be active for quite a while now, I think I will upload the package myself on pub.dev

@vadrian89
Copy link

Can you try html_editor_plus and see if still persists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants