How to determine if CKEditor is loaded?

前端 未结 7 1460
野性不改
野性不改 2021-02-18 16:16

How do I find out if CKEditor is loaded? I\'ve looked through the API docs, but could only find the loaded event. I want to check if CKEditor is loaded, because if I load it a s

7条回答
  •  失恋的感觉
    2021-02-18 16:35

    I know this is a very old post, but in my research it kept coming up. I am dynamically loading the CKEditor through jQuery. I didn't want to load it multiple times since things start happening, as you found out.

    Simple solution:

    if (!window.CKEDITOR) {
        // (not loaded yet, your code to load it)
    }
    

提交回复
热议问题