WebTextEditor provides ways to enable Media Searching in Media Gallery, which are
using search media on load and media resources.
This topic will show you how to enable media searching.
To search media on load
- Right-click on WebTextEditor control and choose Properties.
- Expand TaskPaneSettings >> MediaGallery.
- Set Enabled to True.
- To limit the media retrieved in the media search, set MaxMediaRetrieved
to 10.
To use Media Resources
- Right-click on WebTextEditor control and choose Properties.
- Go to Media Resources and choose collection button.
- Add one media collection. Set Name to Products
and Text to Products.
- Go to Resources and click the collection button.
- Add two members. For the first one, set Name to
resProducts, Text to Product Images and
Url to images/products/.
- For the second one, set Name to resScreenshots,
SearchInChildFolder to True, Text
to Screenshot Images and Url to images/screenshots/.
- Add another media collection. Set Name to Other
and Text to Other.
- Go to Resources collection and click the collection button.
- Add one member. Set Name to resOther, Text
to Other Images and Url to images/other/.
- Run the project. In this case, there are two MediaResourceGroup: Products and Other.
Products group consists of products and screenshots folders, while Other group consist
of other folder. In Media Gallery pane, open Search in combo. When you select Products
group, the search will be performed in both products and screenshots folders, however
if you select individual folder, for example: Screenshot Images, the search will
be performed in screenshots folder only.