0

I'm new so I don't know how things really work here but I'm going to give it a try :

I would like to know if there's a way to insert a PDF link in an FAQ widget. I used HTML coding in the WYSIWYG (am I correct?) with the code "<"a href=''>" but it did not work out.

Could you help me, please?

Thanks.

Adrien.

David Lambauer
1,0722 gold badges9 silver badges25 bronze badges
asked Nov 19, 2017 at 17:36

1 Answer 1

0

By default, Magento has some file restrictions for the WYSIWYG editor. You can add PDF as file extension with the following DI snippet:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
 <type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
 <arguments>
 <argument name="extensions" xsi:type="array">
 <item name="allowed" xsi:type="array">
 <item name="pdf" xsi:type="number">1</item>
 </item>
 <item name="image_allowed" xsi:type="array">
 <item name="pdf" xsi:type="number">1</item>
 </item>
 </argument>
 </arguments>
 </type>
</config>

You will find the di.xml like so:

MODULE_VENDOR/MODULE_NAME/etc/di.xml

or:

MODULE_VENDOR/MODULE_NAME/etc/adminhtml/di.xml
answered Nov 19, 2017 at 20:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.