I have written own plugin which generates a simple link. The strange thing is that I can not editing "href" attribute. Other attributes can be edited.
This element does not work:
{
type: 'text',
id: 'url',
label: 'URL',
commit: function(element) {
element.setAttribute('href', this.getValue());
},
setup: function(element) {
this.setValue(element.getAttribute('href'));
}
}
When I create a link, href attribute is written. When I editing a link "href" attribute is not changed. Strange!
When I change the code above and rewrite name of attribute for example to "href-s":
{
type: 'text',
id: 'url',
label: 'URL',
commit: function(element) {
element.setAttribute('href-s', this.getValue());
},
setup: function(element) {
this.setValue(element.getAttribute('href-s'));
}
}
Creation and editing attribute works perfectly.
You do not know what's the problem?
Thank you.