# Installing Magento 2 extension

## **Via Composer:**&#x20;

* Back up your web directory and store the database
* Update the `composer.json` file in your Magento project with the name (`setka/module-editor`) and the current version of the Setka Editor extension.&#x20;

To do so, open the root Magento directory on your server and send the Composer the following command:

```bash
Composer require :<module-editor>:<version>
```

1. Enter your Magento marketplace credentials (public key - username, private key, and password)
2. Go to **Admin > Systems > Tools > Cash** in Magento and click the **Flush Magento Cache** button
3. Log out and log back in once more.&#x20;

The Setka Editor extension is now installed and ready for your content.

{% hint style="info" %}
Learn more on how to install the extension in the [Magento](https://devdocs.magento.com/extensions/install/%C2%A0) [documentation](https://devdocs.magento.com/extensions/install/%C2%A0).
{% endhint %}

## **Via Magento Connect**

You can also install the Setkа Editor extension [via Magento Connect](https://docs.magento.com/m1/ce/user_guide/magento/magento-connect-extension-install.html).

**How to turn on Setka Editor in Magento**

1. Go to **Admin > Stores > Configuration > Content Management**.
2. Open the drop-down in the **WYSIWIG Editor** field and select **Setka Editor**.
3. Click **Save Config**.

![Screenshot of Magento interface. Choosing Setka Editor on the configuration page](https://1843290185-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MLOEPbfEK4119w2ROYc%2F-MRBuw4-O_m78qiDQ9Wk%2F-MRC-4OJWYmESdYe1LeR%2FScreenshot-Magento-Configuration-Setka-Editor.png?alt=media\&token=50276222-4096-4bc1-b026-92a353651936)

\
Once you’ve switched on the Setka Editor extension, you’ll be prompted to enter a license key to connect Setka Editor to your site.

Create [Setka Account](https://editor.setka.io). Then copy the license key from the CMS Integration tab and paste it into the Setka Editor **License key** field.

![Screenshot of Magento interface showing a field to insert the Setka Editor license key](https://1843290185-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MLOEPbfEK4119w2ROYc%2F-MRBuw4-O_m78qiDQ9Wk%2F-MRC0N_d_Gav7Asyajpq%2FScreenshot-Magento-License-Key-Setka-Editor.png?alt=media\&token=f0a9d5aa-e35a-4c45-a85f-efd92b88e9a1)

Once done press on the **Save Config** button and then on the **Update Config** button and you’re all set!&#x20;

Now you can choose where you want to use Setka Editor.  For this, in the Editor Mapping section, you’ll be able to switch on Setka Editor for CMS pages, Category Descriptions, CMS Blocks, or product attributes.&#x20;

![Screenshot of Magento interface: "Editor Mapping" section of Configuration page with "CMS Block", "CMS Page", "Category Description", "Product Attribute" fields with a "Yes"/"No" dropdown menu ](https://1843290185-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MLOEPbfEK4119w2ROYc%2F-MRBuw4-O_m78qiDQ9Wk%2F-MRC0kb-Jis9gv2mFca7%2FScreenshot-Magento-Editor-Mapping-Setka-Editor.png?alt=media\&token=a56facd1-3577-4af2-a8ef-d7f6bfcb6966)

As an example, select CMS Pages and click **Save Config**.&#x20;

Now you can create new pages with Setka Editor. Go to **Admin > Content > Pages** and click **Add New Page**. To access the Setka Editor interface, select the content field as if launching the standard editor.

![A screenshot of Magento interface: Setka Editor interface in the content body editing area ](https://1843290185-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MLOEPbfEK4119w2ROYc%2F-MRBuw4-O_m78qiDQ9Wk%2F-MRC2FW8xImC1BYdC7fK%2FScreenshot-Magento-Setka-Editor-Interface.png?alt=media\&token=a7417f91-7947-44e3-a68d-cb4659572a08)
