How to use the ckeditor4.on function in ckeditor4

To help you get started, we’ve selected a few ckeditor4 examples, based on popular ways it is used in public projects.

github Enalean / tuleap / src / scripts / codendi / RichTextEditor.js View on Github external
if (dialog === "link") {
                definition.removeContents("target");
            }

            if (dialog === "image") {
                tab = definition.getContents("Link");
                tab.remove("cmbTarget");
            }
        });

        this.rte.on("instanceReady", function () {
            this.document.getBody().$.contentEditable = true;
            tuleap.mention.init(this.document.getBody().$);
        });

        CKEDITOR.on(
            "instanceCreated",
            function (evt) {
                if (evt.editor === this.rte) {
                    this.options.onLoad();
                }

                if (!this.can_be_resized()) {
                    evt.editor.config.resize_enabled = false;
                }
            }.bind(this)
        );

        CKEDITOR.on(
            "instanceReady",
            function (evt) {
                if (evt.editor !== this.rte) {
github Enalean / tuleap / src / scripts / codendi / RichTextEditor.js View on Github external
});

        CKEDITOR.on(
            "instanceCreated",
            function (evt) {
                if (evt.editor === this.rte) {
                    this.options.onLoad();
                }

                if (!this.can_be_resized()) {
                    evt.editor.config.resize_enabled = false;
                }
            }.bind(this)
        );

        CKEDITOR.on(
            "instanceReady",
            function (evt) {
                if (evt.editor !== this.rte) {
                    return;
                }

                if (!this.options.autoresize_when_ready) {
                    return;
                }

                if (undefined != this.options.full_width && this.options.full_width) {
                    evt.editor.resize("100%", this.element.getHeight(), true);
                } else if (
                    this.element.getWidth() > 0 &&
                    (typeof this.options.no_resize === "undefined" || !this.options.no_resize)
                ) {
github Enalean / tuleap / src / scripts / codendi / RichTextEditor.js View on Github external
});
        this.rte = CKEDITOR.replace(this.element.id, replace_options);
        initiateUploadImage(this.rte, replace_options, this.element);

        /*CKEDITOR filters HTML tags
              So, if your default text is like <blabla>, this will not be displayed.
              To "fix" this, we escape the textarea content.
              However, we don't need to espace this for non default values.
            */

        if (this.element.readAttribute("data-field-default-value") !== null) {
            var escaped_value = tuleap.escaper.html(this.element.value);
            this.rte.setData(escaped_value);
        }

        CKEDITOR.on("dialogDefinition", function (ev) {
            var tab,
                dialog = ev.data.name,
                definition = ev.data.definition;

            if (dialog === "link") {
                definition.removeContents("target");
            }

            if (dialog === "image") {
                tab = definition.getContents("Link");
                tab.remove("cmbTarget");
            }
        });

        this.rte.on("instanceReady", function () {
            this.document.getBody().$.contentEditable = true;

ckeditor4

JavaScript WYSIWYG web text editor.

(GPL-2.0 OR LGPL-2.1 OR MPL-1…
Latest version published 2 months ago

Package Health Score

74 / 100
Full package analysis

Similar packages