Skip to content

Add documentation about standalone WYSIWYG #121

@jacquesbh

Description

@jacquesbh

We could add this in the documentation to help people using the simple wysiwyg (pell) as a standalone field, not only in UI Elements.

<script type="text/javascript">
    (function () {
        document.addEventListener('DOMContentLoaded', () => {
            let wysiwyg = new MonsieurBizRichEditorWysiwyg({
                actions: [
                    'bold',
                    'italic',
                    'underline',
                    'ulist',
                    'olist',
                    'heading1',
                    'heading2',
                    {
                        name: 'heading3',
                        icon: '<b>H<sub>3</sub></b>',
                        title: 'Heading 3',
                        result: () => wysiwyg.exec('formatBlock', '<h3>')
                    },
                    'link'
                ]
            });
            let forms = document.querySelectorAll('form.form');
            forms.forEach(function (form) {
                wysiwyg.load(form);
            });
        });
    })();
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions