diff views/Extractapp/TaggingText.php @ 104:e542b161d907 extractapp

bug fixed: for only lowercase accepted in html tag.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 05 Aug 2016 13:34:55 +0200
parents 2cc65ff46174
children 7f2c5d542616
line wrap: on
line diff
--- a/views/Extractapp/TaggingText.php	Mon Jul 25 17:10:16 2016 +0200
+++ b/views/Extractapp/TaggingText.php	Fri Aug 05 13:34:55 2016 +0200
@@ -381,8 +381,13 @@
 
                 console.log(selection);
 
+                console.log(JSON.parse('<?php echo json_encode($taglistArray) ?>'));
+                
+                console.log(JSON.parse('<?php echo json_encode($topic_tag) ?>'));
+
 
                 <?php 
+
                 foreach ( $taglistArray as $taglistValue ) {
                     if ($taglistValue[2] == $topic_tag) {
                     	echo "tagging_tags.innerHTML += \"<button accesskey=\\\"1\\\" onclick=\\\"tagwithOnlytag( range, selection, '".$taglistValue[2]."2' )\\\">".$taglistValue[1]."</button>\";\n";
@@ -912,8 +917,9 @@
     var topic_tag2 = topic_tag+"2";
 
     var documentFragment = range.extractContents();
-        
     
+    console.log("topic_tag: "+ topic_tag + ", topic_tag2: " + topic_tag2);
+
     var stringSelection = ""
     var childNodes = documentFragment.childNodes
     for (var i = 0; i < childNodes.length; i++){
@@ -924,6 +930,11 @@
         }
         
     }
+
+
+    //console.log("stringSelection: " + stringSelection);
+
+
     range.deleteContents();
 
     if ( tag==topic_tag2) {