title: How to change a text input in output with shiny?
body: <p>I want to encrypte then decrypte a message that a user would write on shiney:</p>
  <pre><code>ui = basicPage(textInput(&quot;txt&quot;, &quot;Enter the text to display below:&quot;),  textOutput(&quot;text&quot;),  verbatimTextOutput(&quot;verb&quot;))
  
  
  server &lt;- function(input, output) {  
  
  
  dataInput &lt;- reactive({input$txt
  
  })
    
    K &lt;- &quot;&quot;
    
    for(i in (1:nchar(dataInput()))){
      l &lt;- substring(reactive(dataInput), i,i)
      l &lt;- swapletter(l)
      K &lt;- paste(K, l, sep =&quot;&quot;)
    }
    
    
    K
  
    library(&quot;Brobdingnag&quot;)
    
    
    
    CODE &lt;- reactive(fromstringtovec(K))
    Alpha &lt;-reactive(Alphabetfreq(K))
    
    for(it in 1:10){
      #on sort les bigrammes
      bigrammecode &lt;- str_replace(CODE,&quot; &quot;,&quot;&quot;)
      #calcul de la qualité
      QK &lt;- qualité(bigrammecode)
      #premierswap qui réactualise le code et l'alphabet
      Kswap &lt;- rewriteVEC(Alpha, CODE)
      CODENEW &lt;- Kswap[28:length(Kswap)]
      Alphanew &lt;- Kswap[1:26]
      
      #on sort les bigrammes
      bigrammecodenew &lt;- returnbigram2(CODENEW)
      
      QKswap &lt;- qualité(bigrammecodenew)
      
      if(QKswap &gt; QK){ 
        CODE &lt;- CODENEW
        Alpha &lt;- Alphanew}
      else{
        U &lt;- runif(1)
        if (U &lt; (QKswap/QK)){
          CODE &lt;- CODENEW
          Alpha &lt;- Alphanew}
        else{}
      }
      
      if(it == 10){
        print(it)
        output$text &lt;- renderText(print(CODE()))
        output$verb &lt;- renderText({ input$txt })}
    }
  }
  </code></pre>
  <p>I have the Error :Warning: Error in .getReactiveEnvironment()$currentContext: Operation not allowed without an active reactive context.</p>
  <ul>
  <li>You tried to do something that can only be done from inside a reactive consumer.
  57: 
  Error in .getReactiveEnvironment()$currentContext() :
  Operation not allowed without an active reactive context.</li>
  <li>You tried to do something that can only be done from inside a reactive consumer.</li>
  </ul>
  <p>Any ideas? Thank you!</p>