success: function(text){
var t = $(text);
tag.replaceWith(t);
- openForEdit(t);
+ openForEdit(t, trim=false);
},
error: function(){
tag.remove();
}
/* open edition window for selected fragment */
- function openForEdit($origin){
+ function openForEdit($origin, trim=true){
var $box = null
// annotations overlay their sub box - not their own box //
element: source,
stripOuter: true,
success: function(text){
- let ttext = $.trim(text);
+ let ttext = text;
+ if (trim) {
+ ttext = ttext.trim();
+ }
$('textarea', $overlay).val(ttext);
setTimeout(function(){
let $e = $(e);
if ($e.closest('[x-node="abstrakt"]').length) return;
if ($e.closest('[x-node="nota_red"]').length) return;
+ if ($e.closest('[x-annotation-box="true"]').length) return;
let node = $e.attr('x-node');
if (node == 'numeracja') {
number = 0;