Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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) {
});
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)
) {
});
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 , 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;