Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.value = @"<p>The Syncfusion Rich Text Editor, a WYSIWYG (what you see is what you get) editor, is a user interface that allows you to create, edit, and format rich text content. You can try out a demo of this editor here.</p><p><b>Key features:</b></p><ul><li><p>Provides &lt;IFRAME&gt; and &lt;DIV&gt; modes.</p></li><li><p>Bulleted and numbered lists.</p></li><li><p>Handles images, hyperlinks, videos, hyperlinks, uploads, etc.</p></li><li><p>Contains undo/redo manager. </p></li></ul><div style='display: inline-block; width: 60%; vertical-align: top; cursor: auto;'><img alt='Sky with sun' src='https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Overview.png' width='309' style='min-width: 10px; min-height: 10px; width: 309px; height: 174px;' class='e-rte-image e-imginline e-rte-drag-image' height='174' /></div>";
return View();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@Html.EJS().RichTextEditor("drag-drop").InsertAudioSettings(obj => obj.SaveUrl("https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save")).Value(ViewBag.value).Render()



Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<ejs-richtexteditor id="drag-drop" value="@ViewBag.value">
<e-richtexteditor-insertaudiosettings saveUrl="https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save"></e-richtexteditor-insertaudiosettings>
</ejs-richtexteditor>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.value = @"<p>The Syncfusion Rich Text Editor, a WYSIWYG (what you see is what you get) editor, is a user interface that allows you to create, edit, and format rich text content. You can try out a demo of this editor here.</p><p><b>Key features:</b></p><ul><li><p>Provides &lt;IFRAME&gt; and &lt;DIV&gt; modes.</p></li><li><p>Bulleted and numbered lists.</p></li><li><p>Handles images, hyperlinks, videos, hyperlinks, uploads, etc.</p></li><li><p>Contains undo/redo manager. </p></li></ul><div style='display: inline-block; width: 60%; vertical-align: top; cursor: auto;'><img alt='Sky with sun' src='https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Overview.png' width='309' style='min-width: 10px; min-height: 10px; width: 309px; height: 174px;' class='e-rte-image e-imginline e-rte-drag-image' height='174' /></div>";
return View();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@Html.EJS().RichTextEditor("drag-drop").InsertVideoSettings(obj => obj.SaveUrl("https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save")).Value(ViewBag.value).Render()



Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<ejs-richtexteditor id="drag-drop" value="@ViewBag.value">
<e-richtexteditor-insertvideosettings saveUrl="https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save"></e-richtexteditor-insertvideosettings>
</ejs-richtexteditor>
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,50 @@ Sets the default display property for audio when it is inserted in the Rich Text
{% endtabs %}
{% endif %}

## Drag and Drop Audio Insertion

By default, the Rich Text Editor allows you to insert audios by drag-and-drop from the local file system such as Windows Explorer into the content editor area. And, you can upload the audios to the server before inserting into the editor by configuring the saveUrl property.

In the following sample, you can see feature demo.

{% if page.publishingplatform == "aspnet-core" %}

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/controller.cs %}
{% endhighlight %}
{% endtabs %}

{% elsif page.publishingplatform == "aspnet-mvc" %}

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/controller.cs %}
{% endhighlight %}
{% endtabs %}
{% endif %}


### Disabling Drag and Drop for Audios

You can prevent drag-and-drop action by setting the actionBegin argument cancel value to true. The following code shows how to prevent the drag-and-drop.

<script>

function actionBegin(args) {
if(args.type === 'drop' || args.type === 'dragstart') {
args.cancel =true;
}
}

</script>

## Customizing the Audio Quick Toolbar

The Rich Text Editor enables customization of the audio quick toolbar, allowing you to tailor its functionality with essential tools such as AudioReplace, Remove, and AudioLayoutOption.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,49 @@ Sets the default display property for the video when it is inserted in the Rich
{% endtabs %}
{% endif %}

## Drag and Drop Video Insertion

By default, the Rich Text Editor allows you to insert videos by drag-and-drop from the local file system such as Windows Explorer into the content editor area. And, you can upload the videos to the server before inserting into the editor by configuring the saveUrl property.

In the following sample, you can see feature demo.

{% if page.publishingplatform == "aspnet-core" %}

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/video/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/video/controller.cs %}
{% endhighlight %}
{% endtabs %}

{% elsif page.publishingplatform == "aspnet-mvc" %}

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/video/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/video/controller.cs %}
{% endhighlight %}
{% endtabs %}
{% endif %}


### Disabling Drag and Drop for Videos

You can prevent drag-and-drop action by setting the actionBegin argument cancel value to true. The following code shows how to prevent the drag-and-drop.

<script>

function actionBegin(args) {
if(args.type === 'drop' || args.type === 'dragstart') {
args.cancel =true;
}
}

</script>

## Video Resizing Tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,50 @@ Sets the default display property for audio when it is inserted in the Rich Text
{% endtabs %}
{% endif %}

## Drag and Drop Audio Insertion

By default, the Rich Text Editor allows you to insert audios by drag-and-drop from the local file system such as Windows Explorer into the content editor area. And, you can upload the audios to the server before inserting into the editor by configuring the saveUrl property.

In the following sample, you can see feature demo.

{% if page.publishingplatform == "aspnet-core" %}

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/controller.cs %}
{% endhighlight %}
{% endtabs %}

{% elsif page.publishingplatform == "aspnet-mvc" %}

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/audio/controller.cs %}
{% endhighlight %}
{% endtabs %}
{% endif %}


### Disabling Drag and Drop for Audios

You can prevent drag-and-drop action by setting the actionBegin argument cancel value to true. The following code shows how to prevent the drag-and-drop.

<script>

function actionBegin(args) {
if(args.type === 'drop' || args.type === 'dragstart') {
args.cancel =true;
}
}

</script>

## Customizing the Audio Quick Toolbar

The Rich Text Editor enables customization of the audio quick toolbar, allowing you to tailor its functionality with essential tools such as AudioReplace, Remove, and AudioLayoutOption.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,50 @@ Sets the default display property for the video when it is inserted in the Rich
{% endtabs %}
{% endif %}

## Drag and Drop Video Insertion

By default, the Rich Text Editor allows you to insert videos by drag-and-drop from the local file system such as Windows Explorer into the content editor area. And, you can upload the videos to the server before inserting into the editor by configuring the saveUrl property.

In the following sample, you can see feature demo.

{% if page.publishingplatform == "aspnet-core" %}

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/video/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/video/controller.cs %}
{% endhighlight %}
{% endtabs %}

{% elsif page.publishingplatform == "aspnet-mvc" %}

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/rich-text-editor/drag-drop/video/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Controller.cs" %}
{% include code-snippet/rich-text-editor/drag-drop/video/controller.cs %}
{% endhighlight %}
{% endtabs %}
{% endif %}


### Disabling Drag and Drop for Videos

You can prevent drag-and-drop action by setting the actionBegin argument cancel value to true. The following code shows how to prevent the drag-and-drop.

<script>

function actionBegin(args) {
if(args.type === 'drop' || args.type === 'dragstart') {
args.cancel =true;
}
}

</script>

## Video resizing

The Rich Text Editor has built-in video resizing support, which is enabled for the video elements added. The resize points will appear on each corner of the video when focusing, so users can easily resize the video using mouse points or thumb through the resize points. Also, the resize calculation will be done based on the aspect ratio.
Expand Down