Skip to main content
A newer version of this page is available. .

ASPxHtmlEditorSettings.AllowInsertDirectImageUrls Property

Gets or sets a value that specifies whether direct links to the specified images located on other web sites are allowed to be inserted into the editor’s HTML markup.

Namespace: DevExpress.Web.ASPxHtmlEditor

Assembly: DevExpress.Web.ASPxHtmlEditor.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(true)]
public bool AllowInsertDirectImageUrls { get; set; }

Property Value

Type Default Description
Boolean **true**

true if direct links to external images are allowed; false to download external images to the web site’s upload folder and refer to them using local paths.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to AllowInsertDirectImageUrls
ASP.NET Controls and MVC Extensions ASPxHtmlEditor
.Settings .AllowInsertDirectImageUrls
ASP.NET MVC Extensions HtmlEditorSettings
.Settings .AllowInsertDirectImageUrls
MVCxHtmlEditor
.Settings .AllowInsertDirectImageUrls

Remarks

Use the AllowInsertDirectImageUrls property to specify whether the ASPxHtmlEditor allows inserting direct links to external images located on other web sites.

Note that if direct image links are allowed, they may be a potential cause of harmful actions (for instance, a specific harmful script can try to run if it’s assigned as an external image’s Load event handler).

To avoid using direct links, set the AllowInsertDirectImageUrls property to false. In this case, any specified external image is first downloaded to a specific folder on the application’s web server, and then it’s referred to within the editor using its local path. Use the ASPxHtmlEditorImageUploadSettings.UploadImageFolder property, to specify the folder that contains uploaded images used by the ASPxHtmlEditor control.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowInsertDirectImageUrls property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also