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*”.
Hi @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:
[pdf-embedder url="path-to-pdf" ]
-
This reply was modified 4 years, 7 months ago by
PDFG Support. Reason: coding wrapping hiccup
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!