@Html.EJ (). RTEFor you can increase the ability to Upload Image

I use @Html.EJ (). RTEFor (model => model.Description, new {htmlAttributes = new {@class = "form-control"}}) can work well under attachment 1

If you can increase the ability to. Sample Upload @Html.EJ () RTE as Attachment 2
  How do you do it?

THX.

Attachment: Editor_62e8d025.zip

10 Replies

KR Keerthana Rajendran Syncfusion Team January 22, 2018 09:31 AM UTC

Hi Miclejee, 
 
Thank you for contacting Syncfusion support.  
 
We have prepared a sample for using File and Image Browser with RTEFor control. Please refer to the below given code 
 
@model RTEFor.RTE 
<div id = "ControlRegion"> 
<div> 
    @{ List<String> images = new List<string>() { "images" }; 
        List<String> image = new List<string>() { "image" };} 
 
     @Html.EJ().RTEFor(model => model.value, new { htmlAttributes = new { @class = "form-control" } }).ToolsList(images).MinWidth("200px").ShowFooter(true).Tools(tool => tool.Images(image)).ImageBrowser(img => img.FilePath("~/FileExplorerContent/").ExtensionAllow("*.png,*.gif,*.jpg,*.jpeg").AjaxAction(@Url.Content("FileActionMethods"))).FileBrowser(file => file.FilePath("~/FileExplorerContent/").ExtensionAllow("*.png,*.txt,*.jpg,*.docx").AjaxAction("FileActionMethods")) 
</div> 
 
</div> 
 
 
 
We have attached a sample for reference which can be downloaded from the below link: 
 
 
 
Regards, 
Keerthana


MJ MJ February 21, 2018 07:34 AM UTC

Help us to use. .ImageBrowser(img => img.FilePath ("~ / FileExplorerContent /")
And .FileBrowser(file => file.FilePath ("~ / FileExplorerContent /").
If set ("~ / FileExplorerContent / + GENID from code control


KR Keerthana Rajendran Syncfusion Team February 22, 2018 06:15 AM UTC

Hi Miclejee,   
   
We have prepared a sample based on our understanding by passing GENID from model and concatenated this with file path. Please refer to the below code.   
   
Controller:   
   
public ActionResult RichTextEditorFeatures()   
        {   
            RTE obj = new RTE();   
            obj.GENID = "images";   
            return View(obj);   
        }   
   
   
View:   
@Html.EJ().RTEFor(model => model.value, new { htmlAttributes = new { @class = "form-control" } }).ToolsList(images).MinWidth("200px").ShowFooter(true).Tools(tool => tool.Images(image)).ImageBrowser(img => img.FilePath("~/FileExplorerContent/"+ Model.GENID).ExtensionAllow("*.png,*.gif,*.jpg,*.jpeg").AjaxAction(@Url.Content("FileActionMethods"))).FileBrowser(file => file.FilePath("~/FileExplorerContent/"+ Model.GENID).ExtensionAllow("*.png,*.txt,*.jpg,*.docx").AjaxAction("FileActionMethods"))   
   
We have modified our previous sample based on this which can be downloaded from the following link   
   
   
You can modify this based on your scenario. If we have misunderstood, please provide us more details on your requirement so that it would be helpful for us to serve you better.   
   
Regards,   
Keerthana.   



MJ MJ March 5, 2018 06:35 AM UTC

I Created Work Fine
but Edit and View Content image not Show

Attach Picture RTE_FOR_DRROR_01
i see in data Field on MSSQL Store Image in Content OK. =>   src="../FileExplorerContent/b75f6aef-3573-4351-ad99-161b202ec7b4/cute-cat-picture_1122-449.jpg">
Attach Picture RTE_FOR_DRROR_02


THX.

Pls. Help ME.


---------------------
We have prepared a sample based on our understanding by passing GENID from model and concatenated this with file path. Please refer to the below code.   
   
Controller:   
   
public ActionResult RichTextEditorFeatures()   
        {   
            RTE obj = new RTE();   
            obj.GENID = "images";   
            return View(obj);   
        }   
   
   
View:   
@Html.EJ().RTEFor(model => model.value, new { htmlAttributes = new { @class = "form-control" } }).ToolsList(images).MinWidth("200px").ShowFooter(true).Tools(tool => tool.Images(image)).ImageBrowser(img => img.FilePath("~/FileExplorerContent/"+ Model.GENID).ExtensionAllow("*.png,*.gif,*.jpg,*.jpeg").AjaxAction(@Url.Content("FileActionMethods"))).FileBrowser(file => file.FilePath("~/FileExplorerContent/"+ Model.GENID).ExtensionAllow("*.png,*.txt,*.jpg,*.docx").AjaxAction("FileActionMethods"))   







Attachment: RTE_FOR_DRROR_430999e5.zip


MJ MJ March 6, 2018 09:05 AM UTC

THX.

OK Work Fine.


KR Keerthana Rajendran Syncfusion Team March 6, 2018 09:26 AM UTC

  
Hi Miclejee, 
 
Thanks for your update. Please get back to us if your require further assistance on this. We will be happy to assist you. 
 
Regards, 
Keerthana. 



MJ MJ September 4, 2018 05:27 AM UTC

I do as you suggest. I can upload a picture. Work Fine very good.
If I need to upload a PDF / XLS file or another file
I need to update some.





KV Karthikeyan Viswanathan Syncfusion Team September 4, 2018 05:36 AM UTC

Hi Miclejee, 
 
Yes, you need to update the required extension in ExtensionAllow property. Please refer the below code example: 

<code> 
View:    
@Html.EJ().RTEFor(model => model.value, new { htmlAttributes = new { @class = "form-control" } }).ToolsList(images).MinWidth("200px").ShowFooter(true).Tools(tool => tool.Images(image)).ImageBrowser(img => img.FilePath("~/FileExplorerContent/"+ Model.GENID).ExtensionAllow("*.png,*.gif,*.jpg,*.jpeg").AjaxAction(@Url.Content("FileActionMethods"))).FileBrowser(file => file.FilePath("~/FileExplorerContent/"+ Model.GENID).ExtensionAllow("*.png,*.txt,*.jpg,*.docx").AjaxAction("FileActionMethods"))    

</code> 


Regards, 
Karthikeyan V.  



MJ MJ September 10, 2018 02:36 AM UTC

Yes !!! Very Good


KV Karthikeyan Viswanathan Syncfusion Team September 10, 2018 04:30 AM UTC

Hi Miclejee,  
 
Thanks for the update. 
 
We are glad to hear that your issue has been resolved. 

Regards,
Karthikeyan V. 
 


Loader.
Up arrow icon