Changeset 30065

Show
Ignore:
Timestamp:
28.07.2015 09:38:45 (4 years ago)
Author:
litvinovg
Message:

Fix for editor bug. Removed ckeditor internal information from saved content.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/documentmaker_scripts_util.js

    r29978 r30065  
    336336        { 
    337337            var section = changedElem.parentDiv.parentItem; 
    338             saveTransaction('{"operation":"setText", "text":"' + changedElem.innerHTML.replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + section.collection + '", "oid":"' + section.nodeID + '"}'); //' 
     338            saveTransaction('{"operation":"setText", "text":"' + CKEDITOR.instances[changedElem.getAttribute("id")].getData().replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + section.collection + '", "oid":"' + section.nodeID + '"}'); //' 
    339339            addCollectionToBuild(section.collection); 
    340340        } 
     
    343343            var id = changedElem.getAttribute("id"); 
    344344            var sectionID = id.substring(4); 
    345             saveTransaction('{"operation":"setText", "text":"' + changedElem.innerHTML.replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + gs.cgiParams.c + '", "oid":"' + sectionID + '"}'); //' 
     345            saveTransaction('{"operation":"setText", "text":"' + CKEDITOR.instances[changedElem.getAttribute("id")].getData().replace(/"/g, "\\\"").replace(/&/g, "%26") + '", "collection":"' + gs.cgiParams.c + '", "oid":"' + sectionID + '"}'); //' 
    346346            addCollectionToBuild(gs.cgiParams.c); 
    347347        }