Future plans

4 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    468 posts
    Member since:
    Feb 2007

    Posted 26 Oct 2018 Link to this post

    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

     

  2. Rumen
    Admin
    Rumen avatar
    14462 posts

    Posted 26 Oct 2018 Link to this post

    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.
  3. Fit2Page
    Fit2Page avatar
    468 posts
    Member since:
    Feb 2007

    Posted 26 Oct 2018 in reply to Rumen Link to this post

    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

  4. Rumen
    Admin
    Rumen avatar
    14462 posts

    Posted 29 Oct 2018 Link to this post

    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.
Back to Top