Changeset 30065


Ignore:
Timestamp:
2015-07-28T09:38:45+12:00 (7 years ago)
Author:
Georgiy Litvinov
Message:

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

File:
1 edited

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        }
Note: See TracChangeset for help on using the changeset viewer.