RadEditor weird beahviour when custom menu

5 posts, 0 answers
  1. david
    david avatar
    4 posts
    Member since:
    Nov 2015

    Posted 18 Nov 2015 Link to this post

    I am trying to have a custom dropdown on the editor but for some reason it is working but its also making my nonjustify tool active upppon using it here is my code

     

    01.                   <telerik:RadEditor ID="txtMessage"  ToolsFile="~/BackDoor/ToolsFile.xml" runat="server" Skin="Bootstrap"  OnClientCommandExecuting="OnClientCommandExecuting" RenderMode="Auto">
    02.                    <Tools>
    03.    <telerik:EditorToolGroup>   
    04.        <telerik:EditorSplitButton Name="TagList"  Text="Sets Dynamic Tags In Emails"   ImageUrl="~/assets/img/tags.png"  ImageUrlLarge="~/assets/img/tags.png" ItemsPerRow="5" PopupWidth="170px" PopupHeight="117px" RenderMode="Auto">
    05.          <telerik:EditorDropDownItem  Name ="{Player_ID}" value="{player_Id}"/>
    06.        <telerik:EditorDropDownItem  Name ="{Player_name}" value="{player_name}"/>   
    07.        <telerik:EditorDropDownItem  Name ="{Player_IpAddress}" value="{player_IpAddress}"/>   
    08.             <telerik:EditorDropDownItem  Name ="{Player_Points}" value="{player_points}"/>   
    09.            <telerik:EditorDropDownItem  Name ="{Player_Points}" value="{player_prize}"/>   
    10.        </telerik:EditorSplitButton>
    11.    </telerik:EditorToolGroup>
    12.</Tools> 
    13.                     
    14. 
    15.                    </telerik:RadEditor>

    And here is what i use in the client side event

     

    01.   <script type="text/javascript">
    02.        function OnClientCommandExecuting(editor, args) {
    03.            var name = args.get_name(); //The command name
    04.            var val = args.get_value(); //The tool that initiated the command
    05.            if (name == "TagList") {
    06.                editor.pasteHtml("" + val + "");
    07.                //Cancel the further execution of the command as such a command does not exist in the editor command list
    08.                args.set_cancel(true);
    09.            }
    10.        }
    11.</script>
    12.      
    13. 
    14.     
    15.<style type="text/css">
    16.    span .reTagList
    17.    {
    18.        background-image:url(/assets/img/label49.png);
    19.       background-repeat: no-repeat;                                                         
    20.    }   
    21.         
    22.</style>

     

    Also I cannot get my icon to appear any ideas guys as what going on im using 30 day demo just

  2. david
    david avatar
    4 posts
    Member since:
    Nov 2015

    Posted 18 Nov 2015 in reply to david Link to this post

    Also how do i add that dropdown into my tools xml as I want it avaible everywhere ?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 20 Nov 2015 Link to this post

    Hi David,

    The Non-justify tool get active after your custom-tool insertion, as it reflects the current justification of the focused element. As the inserted by you string is non-justified - the corresponding toll gets active.

    As for the loading of such custom tools from external tools file - I am afraid that it is not possible for the moment.

    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. david
    david avatar
    4 posts
    Member since:
    Nov 2015

    Posted 22 Nov 2015 in reply to Vessy Link to this post

    Is their anyway to disable that beahvior cause it would be wrong for the end user to think they have clicked the justify button??.

     

     

  6. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 24 Nov 2015 Link to this post

    Hi David,

    I am afraid that it is not possible to disable this functionality as it is executed on every element focusing in order to determine what are the actions applied to it. Following the same logic the Bold icon will be selected if the user clicks over a bold-applied text.

    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017