I have a strange bug in my Bueditor. For Image button and URL button.

This is the code of my Image button:

js:
var B = eDefBrowseButton('/?q=imce/browse', 'attr_src', 'Browse', 'image');
var form = [
 {name: 'src', title: 'Адрес изображения', suffix: B},
 {name: 'width', title: 'Ширина x Высота', suffix: ' x ', getnext: true, attributes: {size: 3}},
 {name: 'height', attributes: {size: 3}},
 {name: 'alt', title: 'Альтернативный текст'},
{name: 'align', title: 'Выравнивание', type: 'select', options: {'': '', left: 'По левому краю', right: 'По правому краю', center: 'По центру'}}
];
eDefTagDialog('img', form, 'Вставить/Редактировать изображение', 'Вставить');

When I want to put image I get this code instead of image:

<img src="" alt="" each="function (iterator) {
    var index = 0;
    try {
        this._each(function (value) {try {iterator(value, index++);} catch (e) {if (e != $continue) {throw e;}}});
    } catch (e) {
        if (e != $break) {
            throw e;
        }
    }
}" all="function (iterator) {
    var result = true;
    this.each(function (value, index) {result = result && !!(iterator || Prototype.K)(value, index);if (!result) {throw $break;}});
    return result;
}" any="function (iterator) {
    var result = true;
    this.each(function (value, index) {if (result = !!(iterator || Prototype.K)(value, index)) {throw $break;}});
    return result;
}" collect="function (iterator) {
    var results = [];
    this.each(function (value, index) {results.push(iterator(value, index));});
    return results;
}" detect="function (iterator) {
    var result;
    this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
    return result;
}" findAll="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
    return results;
}" grep="function (pattern, iterator) {
    var results = [];
    this.each(function (value, index) {var stringValue = value.toString();if (stringValue.match(pattern)) {results.push((iterator || Prototype.K)(value, index));}});
    return results;
}" include="function (object) {
    var found = false;
    this.each(function (value) {if (value == object) {found = true;throw $break;}});
    return found;
}" inject="function (memo, iterator) {
    this.each(function (value, index) {memo = iterator(memo, value, index);});
    return memo;
}" invoke="function (method) {
    var args = $A(arguments).slice(1);
    return this.collect(function (value) {return value[method].apply(value, args);});
}" max="function (iterator) {
    var result;
    this.each(function (value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value >= result) {result = value;}});
    return result;
}" min="function (iterator) {
    var result;
    this.each(function (value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value < result) {result = value;}});
    return result;
}" partition="function (iterator) {
    var trues = [], falses = [];
    this.each(function (value, index) {((iterator || Prototype.K)(value, index) ? trues : falses).push(value);});
    return [trues, falses];
}" pluck="function (property) {
    var results = [];
    this.each(function (value, index) {results.push(value[property]);});
    return results;
}" reject="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (!iterator(value, index)) {results.push(value);}});
    return results;
}" sortBy="function (iterator) {
    return this.collect(function (value, index) {return {value: value, criteria: iterator(value, index)};}).sort(function (left, right) {var a = left.criteria, b = right.criteria;return a < b ? -1 : a > b ? 1 : 0;}).pluck("value");
}" toArray="function () {
    return this.collect(Prototype.K);
}" zip="function () {
    var iterator = Prototype.K, args = $A(arguments);
    if (typeof args.last() == "function") {
        iterator = args.pop();
    }
    var collections = [this].concat(args).map($A);
    return this.map(function (value, index) {return iterator(collections.pluck(index));});
}" inspect="function () {
    return "[" + this.map(Object.inspect).join(", ") + "]";
}" find="function (iterator) {
    var result;
    this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
    return result;
}" select="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
    return results;
}" member="function (object) {
    var found = false;
    this.each(function (value) {if (value == object) {found = true;throw $break;}});
    return found;
}" entries="function () {
    return this.collect(Prototype.K);
}" _reverse="function reverse() {
    [native code]
}" _each="function (iterator) {
    for (var i = 0; i < this.length; i++) {
        iterator(this[i]);
    }
}" clear="function () {
    this.length = 0;
    return this;
}" first="function () {
    return this[0];
}" last="function () {
    return this[this.length - 1];
}" compact="function () {
    return this.select(function (value) {return value != undefined || value != null;});
}" flatten="function () {
    return this.inject([], function (array, value) {return array.concat(value && value.constructor == Array ? value.flatten() : [value]);});
}" without="function () {
    var values = $A(arguments);
    return this.select(function (value) {return !values.include(value);});
}" call="function () {
    var args = arguments;
    this.each(function (f) {f.apply(this, args);});
}" removeDuplicates="function () {
    for (i = 1; i < this.length; i++) {
        if (this[i][0] == this[i - 1][0]) {
            this.splice(i, 1);
        }
    }
}" empty="function () {
    for (i = 0; i <= this.length; i++) {
        this.shift();
    }
}" />

This is the code for my URL button:

js:
var B = eDefBrowseButton('', 'attr_href', 'Browse', 'link');
var form = [
 {name: 'href', title: 'Адрес ссылки', suffix: B},
 {name: 'title', title: 'Текст подсказки'}
];
eDefTagDialog('a', form, 'Вставить/Редактировать ссылку', 'Вставить');

When I want to put URL I get this code instead of URL:

<a each="function (iterator) {
    var index = 0;
    try {
        this._each(function (value) {try {iterator(value, index++);} catch (e) {if (e != $continue) {throw e;}}});
    } catch (e) {
        if (e != $break) {
            throw e;
        }
    }
}" all="function (iterator) {
    var result = true;
    this.each(function (value, index) {result = result && !!(iterator || Prototype.K)(value, index);if (!result) {throw $break;}});
    return result;
}" any="function (iterator) {
    var result = true;
    this.each(function (value, index) {if (result = !!(iterator || Prototype.K)(value, index)) {throw $break;}});
    return result;
}" collect="function (iterator) {
    var results = [];
    this.each(function (value, index) {results.push(iterator(value, index));});
    return results;
}" detect="function (iterator) {
    var result;
    this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
    return result;
}" findAll="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
    return results;
}" grep="function (pattern, iterator) {
    var results = [];
    this.each(function (value, index) {var stringValue = value.toString();if (stringValue.match(pattern)) {results.push((iterator || Prototype.K)(value, index));}});
    return results;
}" include="function (object) {
    var found = false;
    this.each(function (value) {if (value == object) {found = true;throw $break;}});
    return found;
}" inject="function (memo, iterator) {
    this.each(function (value, index) {memo = iterator(memo, value, index);});
    return memo;
}" invoke="function (method) {
    var args = $A(arguments).slice(1);
    return this.collect(function (value) {return value[method].apply(value, args);});
}" max="function (iterator) {
    var result;
    this.each(function (value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value >= result) {result = value;}});
    return result;
}" min="function (iterator) {
    var result;
    this.each(function (value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value < result) {result = value;}});
    return result;
}" partition="function (iterator) {
    var trues = [], falses = [];
    this.each(function (value, index) {((iterator || Prototype.K)(value, index) ? trues : falses).push(value);});
    return [trues, falses];
}" pluck="function (property) {
    var results = [];
    this.each(function (value, index) {results.push(value[property]);});
    return results;
}" reject="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (!iterator(value, index)) {results.push(value);}});
    return results;
}" sortBy="function (iterator) {
    return this.collect(function (value, index) {return {value: value, criteria: iterator(value, index)};}).sort(function (left, right) {var a = left.criteria, b = right.criteria;return a < b ? -1 : a > b ? 1 : 0;}).pluck("value");
}" toArray="function () {
    return this.collect(Prototype.K);
}" zip="function () {
    var iterator = Prototype.K, args = $A(arguments);
    if (typeof args.last() == "function") {
        iterator = args.pop();
    }
    var collections = [this].concat(args).map($A);
    return this.map(function (value, index) {return iterator(collections.pluck(index));});
}" inspect="function () {
    return "[" + this.map(Object.inspect).join(", ") + "]";
}" find="function (iterator) {
    var result;
    this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
    return result;
}" select="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
    return results;
}" member="function (object) {
    var found = false;
    this.each(function (value) {if (value == object) {found = true;throw $break;}});
    return found;
}" entries="function () {
    return this.collect(Prototype.K);
}" _reverse="function reverse() {
    [native code]
}" _each="function (iterator) {
    for (var i = 0; i < this.length; i++) {
        iterator(this[i]);
    }
}" clear="function () {
    this.length = 0;
    return this;
}" first="function () {
    return this[0];
}" last="function () {
    return this[this.length - 1];
}" compact="function () {
    return this.select(function (value) {return value != undefined || value != null;});
}" flatten="function () {
    return this.inject([], function (array, value) {return array.concat(value && value.constructor == Array ? value.flatten() : [value]);});
}" without="function () {
    var values = $A(arguments);
    return this.select(function (value) {return !values.include(value);});
}" call="function () {
    var args = arguments;
    this.each(function (f) {f.apply(this, args);});
}" removeDuplicates="function () {
    for (i = 1; i < this.length; i++) {
        if (this[i][0] == this[i - 1][0]) {
            this.splice(i, 1);
        }
    }
}" empty="function () {
    for (i = 0; i <= this.length; i++) {
        this.shift();
    }
}"></a>

It worked well but one day... And it doesn't work any more.
What to do?
Thank you.

Comments

ufku’s picture

Status: Active » Closed (fixed)