froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.28k stars 672 forks source link

`editor.lists.format('OL')` says TypeError: undefined is not an object (evaluating 'editor.lists.format') #4201

Open manivel-nagarajan opened 3 years ago

manivel-nagarajan commented 3 years ago
Expected behavior.

It should format the selected text with an ordered list formatting option

Actual behavior.

Script evaluation fails, so formatting is not happening

Steps to reproduce the problem.

Here is my editor html

<html>
    <head>
    <link href="node_modules/froala-editor/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />
    <style>
        .fr-toolbar .fr-newline {
            height: 0px;
        }
        .fr-box.fr-basic .fr-element{
            padding: 0px;
        }
        .fr-toolbar {
            border: 0px;
        }
        .fr-box.fr-basic .fr-wrapper {
            border: 0px;
        }
    </style>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    </head>

    <body>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/froala-editor@3.1.0/js/froala_editor.pkgd.min.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/froala-editor@3.1.0/js/plugins/lists.min.js"></script>
        <div id="froala-editor">%@</div>
        <script>
           var editor = new FroalaEditor('div#froala-editor', {
               attribution: false,
               quickInsertEnabled: false,
               charCounterCount: false,
               shortcutsEnabled:false,
               placeholderText: '',
               pluginsEnabled: ['lists'],
           })
        </script>
    </body>
</html>
Editor version.

froala-editor@3.1.0

OS.

iOS 12.2 -

Browser.

Safari in iOS - WKWebView

AkshayCM commented 2 years ago

Thank you for your feedback. The request has been reported to the product management team for evaluation and consideration for an upcoming release.