Question/bug to apply CSS class to an element

6 posts, 0 answers
  1. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 10 Sep 2015 Link to this post

    Go to online demo http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

    1. When a css class applied to an element, e.g. a link, from the classname dropdown then when this element selected after that, the css class is not displayed in this dropdown. See http://screencast.com/t/xUKA00DUusUr
    Is it bug or feature?

    2. Is there a way to allow entering any class name which is not listed in this classname dropdown, e.g. "greenText"?

     

     

     

     

     

     

     

  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 11 Sep 2015 Link to this post

    Hi Michael,

    The reported issue is related to this bug—http://feedback.telerik.com/Project/108/Feedback/Details/139016. Due to the issue with selection, the Apply Css Class tool cannot property update its state.

    As for adding additional classes, take a look at this help article—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/dropdowns/css-styles.

    Regards,
    Ianko
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 11 Sep 2015 in reply to Ianko Link to this post

    Yes, looks like the issue is limited to IE11.

    Re. assigning css class: there is no issue to configure css class dropdown with any predefined classes and let a user select it. Since this element is implemented as dropdown list then there is no way to a user to enter a css class which is not a part of that list. E.g. in the editor overview demo how a user could set the css class "my-green-link" to the first link in the text? The only way I know is to go to html mode and add it manually which could be tricky for many users.

    As a workaround, I'd like to have a combobox with custom values allowed. 

  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 12 Sep 2015 Link to this post

    Hi,

    There is no built-in tool that can do that. The reason for a custom value to not be available is because if a value does not exist, then the element will not be decorated, as there is no CSS behind that class. Therefore, it is a must for the user to go to HTML, add the class and add the CSS that is related to that class. 

    As for creating a custom tool, I suggest you to rather create a custom dialog (http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx) that enables the end-user to add custom CSS classes to the dropdown by adding the custom CSS rules that would be needed in the content area.

    Regards,
    Ianko
    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
  6. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 14 Sep 2015 in reply to Ianko Link to this post

    I see, thanks.

    I wonder is there any chance to combine the styles from an external css file with the css elements defined in the tools.xml or in the code?

  7. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 14 Sep 2015 Link to this post

    Hello,

    If you refer to CssClasses collection, yes, you can. This is described in this help article—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/dropdowns/css-styles.

    Regards,
    Ianko
    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