Title: Shortcode in textarea
Last modified: August 31, 2021

---

# Shortcode in textarea

 *  Resolved [harchvertelol](https://wordpress.org/support/users/harchvertelol/)
 * (@harchvertelol)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-textarea/)
 * I want to edit some descriptions (in my plugin) that contain the shortcode for
   inserting pdf, but inside the textarea block, the shortcode is also replaced 
   with what the plugin inserts. How can I get around this so that this does not
   happen inside the textarea? Or to prevent this from happening on a certain page?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [harchvertelol](https://wordpress.org/support/users/harchvertelol/)
 * (@harchvertelol)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-textarea/#post-14825621)
 * For example, I want edit text: “Very cool PDF: [pdf-embedder url=’cool.pdf’]”.
 * But in textarea showing “Very cool PDF: *many tags for embedding*”.
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-textarea/#post-14828409)
 * Hi [@harchvertelol](https://wordpress.org/support/users/harchvertelol/),
 * Forgive me if I misunderstand the question but you are wanting to display the
   shortcode in your text and not have the PDF viewer displayed (and throwing an
   error on the “fake” file path, correct?
 * To do that you can either wrap the shortcode in a `<pre>` tag to indicate the
   output is actually a code snippet and not a shortcode to be rendered, or write
   the shortcode with the HTML entities. For example:
 * `&lbrack;pdf-embedder url=&quot;path-to-pdf&quot; &rbrack;`
    -  This reply was modified 4 years, 7 months ago by [PDFG Support](https://wordpress.org/support/users/wppdfsupport/).
      Reason: coding wrapping hiccup
 *  Thread Starter [harchvertelol](https://wordpress.org/support/users/harchvertelol/)
 * (@harchvertelol)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-textarea/#post-14833534)
 * I’m sorry, but tag `<pre>` is not working.
    Code: `<pre><textarea id="desc_value_inp"
   rows="10" cols="45" name="desc_value"><? echo stripcslashes($desc_text); ?></
   textarea></pre>`
 * In textarea form we have:
 *     ```
       ...
       <a href="source.pdf" class="pdfemb-viewer" style="" data-width="max" data-height="max"  data-toolbar="bottom" data-toolbar-fixed="off">source<br/></a>
       ...
       ```
   
 * but we should have:
 *     ```
       ...
       [pdf-embedder url='source.pdf']
       ...
       ```
   
 * Variable $desc_text containted text with tags for my editing, but I can’t do 
   this, because in editbox (textarea tag) we have replaced tag [pdf-embedder].
 * But on other page we load $desc_text, and I want that on this page this tag is
   working.
 * Thank you!
    -  This reply was modified 4 years, 7 months ago by [harchvertelol](https://wordpress.org/support/users/harchvertelol/).
    -  This reply was modified 4 years, 7 months ago by [harchvertelol](https://wordpress.org/support/users/harchvertelol/).
    -  This reply was modified 4 years, 7 months ago by [harchvertelol](https://wordpress.org/support/users/harchvertelol/).
    -  This reply was modified 4 years, 7 months ago by [harchvertelol](https://wordpress.org/support/users/harchvertelol/).
    -  This reply was modified 4 years, 7 months ago by [harchvertelol](https://wordpress.org/support/users/harchvertelol/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Shortcode in textarea’ is closed to new replies.

 * ![](https://ps.w.org/pdf-embedder/assets/icon.svg?rev=3227003)
 * [PDF Embedder](https://wordpress.org/plugins/pdf-embedder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pdf-embedder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pdf-embedder/)
 * [Active Topics](https://wordpress.org/support/plugin/pdf-embedder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pdf-embedder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pdf-embedder/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [harchvertelol](https://wordpress.org/support/users/harchvertelol/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-in-textarea/#post-14833534)
 * Status: resolved