Open jasoncslaughter opened 7 years ago
Here is a workaround I just came up with until this is sorted correctly.
var stdMenu = [
{
caption: "Make Null",
action: function(htmlID, actionParameter) {
Xonomy.editRaw(htmlID, actionParameter);
},
actionParameter: {
fromJs: function(jsElement) {
return "<" + jsElement.name + " />";
},
toXml: function(txt, origElement) {
return txt;
}
}
},
{
caption: "Make ?",
action: function(htmlID, actionParameter) {
Xonomy.editRaw(htmlID, actionParameter);
},
actionParameter: {
fromJs: function(jsElement) {
return "<" + jsElement.name + ">?</" + jsElement.name + ">";
},
toXml: function(txt, origElement) {
return txt;
}
}
}
];
var docSpec = {
elements: {
"MessageID": { oneliner: true, menu: stdMenu }
}
}
Now when you "click" on the element name it will pop open this standard menu and use the inbuilt "editRaw" function to set the contents of the element.
@rexrhino You should set hasText:true
for the statistics
element.
I have an xml document that includes empty tags:
I have specified in the settings that the content of
<statistics>
should be settable (at least if I understand correctly).In the editor, the
<statistic>
tag appears as<statistic/>
, and there appears no way to add text content inside of it.Is this a bug, or am I doing something wrong?