Hi Tayfun and others,
Enabling custom widgets within the embedded version of Web AppBuilder in Portal for ArcGIS is NOT a supported workflow.
From the Web AppBuilder help documentation: About Web AppBuilder for ArcGIS
The 3rd paragraph under key features states: “A developer edition is also available that allows you to extend the framework to create custom widgets and themes. Visit ArcGIS for Developers to download Web AppBuilder for ArcGIS (Developer Edition) and learn more about creating your own custom apps.”
While it is technically possible to enable custom widgets within the embedded version of Web AppBuilder in a Portal for ArcGIS instance, this may void the software license technical support contract because you would be altering the internal software files of Portal for ArcGIS.
Only the Developer Edition of Web AppBuilder supports custom widgets.
Hope this helps,