This is a migrated thread and some comments may be shown as answers.

Future plans

3 Answers 35 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 26 Oct 2018, 08:19 AM

Hi,

 

As a long term Telerik user our company is now in the progress of applying some more industry standards.

Maybe someone can shed some light on following questions:

 

Are there plans to let RadEditor work with multi class from the UI?

Are there plans to make the editor more Bootstrap compatible?

 

Thanks, Marc

 

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 Oct 2018, 10:02 AM

Hello Marc,

Can you please be a bit more descriptive and elaborate more on both requests and your scenario?

What do you mean by 

  • RadEditor to work with multi class from the UI?
  • Be more compatible with Bootstrap? - Do you expect to work with the custom bootstrap themes? You can see the current level of support explained in this feature request topic: Bootstrap themes integration.

Thank you!

Best regards,

Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 26 Oct 2018, 12:34 PM

Hi Rumen,

 

I missed the Bootstrap discussion so I guess this is covered.

For the multiclasses please refer to attached screenshot.

Ever thought of how a user could use multi-class from here?

To create BT classes like: class="bg-dark text-light"

Marc

0
Rumen
Telerik team
answered on 29 Oct 2018, 09:03 AM
Hi Marc,

Thank you for the additional information!


You can use the FormatSets tool. Here is a sample configuration:
<FormatSets>
    <telerik:EditorFormatSet Tag="img" Title="img-thumbnail pull-right img-responsive">
        <Attributes>
            <telerik:EditorFormatSetAttribute Name="class" Value="img-thumbnail pull-right img-responsive" />
        </Attributes>
    </telerik:EditorFormatSet>
</FormatSets>

Check the following resources for more information on the tool:
http://demos.telerik.com/aspnet-ajax/editor/examples/formatsets/defaultcs.aspx - demo
http://www.telerik.com/help/aspnet-ajax/editor-format-sets.html - help


Another approach is to customize the ApplyClass command. Here is one possible solution for the problem, however it is really basic and if the user always clicks "Yes" to the confirm message, depending on the selection, the ApplyClass command might not work as expected. Check the following online help article on how to intersect the editor's commands execution: OnClientCommandExecuting, e.g.

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientCommandExecuting="OnClientCommandExecuting">
</telerik:RadEditor>
<script>
    function OnClientCommandExecuting(editor, args) {
        var commandName = args.get_commandName(),
            className = args.get_value(),
            selectedElement = editor.getSelectedElement();
//you can modify this check so it will fit your needs best
        if (commandName == "ApplyClass" &&
            selectedElement.nodeType === 1 &&
            !Telerik.Web.UI.Editor.Utils.isEditorContentArea(selectedElement)) {
            if (confirm("Do you want the " + className + " class to be appended to the classes of the selected " + selectedElement.nodeName + " element?")) {
                $telerik.$(selectedElement).addClass(className);
                args.set_cancel(true);
            }
        }
    }
</script>




Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Editor
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Rumen
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or