More in this section

Forums / Developing with Sitefinity / Image properties CSS Class

Image properties CSS Class

10 posts, 0 answered
  1. kevin
    kevin avatar
    16 posts
    Registered:
    30 Jan 2007
    12 Jan 2009
    Link to this post
    There's a css class dropdown inside the radeditor if you go to properties of an image.
    I changed that list to replace what was there (radewrongword, radedommouseover) to my own (marginright, marginleft)

    This works on my machine but not when I deploy to a test server with a shared database. Any idea how I can get this change to show up on the test server? I've tried deleting the entire site on test and restarting IIS.
  2. Rumen
    Rumen avatar
    26 posts
    Registered:
    12 Sep 2017
    15 Jan 2009
    Link to this post
    Hello Kevin,

    Please, see the following help articles on the topic:
    CSS Styles
    and
    External CSS Files.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. kevin
    kevin avatar
    16 posts
    Registered:
    30 Jan 2007
    15 Jan 2009
    Link to this post
    Did you read my post? It already works on my machine, this is an issue of deployment.
  4. kevin
    kevin avatar
    16 posts
    Registered:
    30 Jan 2007
    15 Jan 2009
    Link to this post
    Did you read my post? It already works on my machine, this is an issue of deployment. Also, I'm not editing the radeditor menu, I'm editing the image properties css menu.
  5. Rumen
    Rumen avatar
    26 posts
    Registered:
    12 Sep 2017
    19 Jan 2009
    Link to this post
    Hi Kevin,

    The class items listed by the Apply Class dropdown are identical to these inside the Css Class dropdown on the Set Image Properties dialog. That is why if the classes are not populated in the Apply Class dropdown, they will be not listed inside the classes selector on the Set Image Properties dialog.

    Could you please tell us how are loading the css marginright, marginleft classes in the dropdown? Do you use the CssFiles property and loading a css file via it?

    Please, make sure that the css file has set the needed full ASP.NET account permissions and its path comes from the same domain as the page with RadEditor.

    All the best,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. kevin
    kevin avatar
    16 posts
    Registered:
    30 Jan 2007
    19 Jan 2009
    Link to this post
    I edited the /Sitefinity/UserControls/Dialogs/AjaxControlsSkins/Sitefinity/EditorContentArea.css

    And added two classes there.
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    23 Jan 2009
    Link to this post
    Hi Kevin,

    I will try to follow up on Monday with a sample on this.

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    29 Jan 2009
    Link to this post
    Hello Kevin,

    I apologize for the delay.

    I have just tried these steps, and got it working:

    1. Enable Apply Css Class tool in the ~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml:

        <tool name="ApplyClass" />

    2. Add your styles to ~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css in
    order to set them for the editor content area.

    3. Add your styles to the external .css file and specify the path to it in the ~/Sitefinity/Admin/ControlTemplates/Generic_Content/EditorTemplate.ascx like this:

    <CssFiles>
          <telerik:EditorCssFile Value="~/Editor.css" />
    </CssFiles>

    4. Populate the classes collection in the
     ~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml, e.g.:

      <classes>
        <class name="Subtitle" value=".subtitle" />
        <class name="Custom class" value=".custom" />
      </classes>

    The steps above should ensure your styles appear in the dropdown in the Generic Content public control and the Generic Content module.
    To do the same for other modules, you need to edit the CssFiles property in the ControlPanelInsert.ascx and ControlPanelEdit.ascx templates for the respective module. These are located in the ~/Sitefinity/Admin/ControlTemplates/[Name_of_Module] folder.

    For more information about CSS styles with RadEditor for ASP.NET Ajax, see this help article:
    http://www.telerik.com/help/aspnet-ajax/cssstyles.html

    If the problem still persists please try to clear the browser cache and the cookies.

    Do let us know how it goes.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. David
    David avatar
    50 posts
    Registered:
    14 Jan 2009
    10 Apr 2009
    Link to this post
    Hello,

    Is there a solution for this problem in version 3.6?
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Apr 2009
    Link to this post
    Hello David,

    If Georgi's solution does not help, you could try the following.

    1. Open ~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml file
    2. Specify the path to the css file, which you need the editor to use:

    <root>    
    ...    
      <cssFiles>    
        <item name="~/Sitefinity/Admin/ControlTemplates/MyCSS.css" />    
      </cssFiles>    
    ...    
    </root>    
     

    3. Delete the <class> elements which appear as child elements of an element <classes>:

    <class name="Add CssClasses:" value=".test" />    
    <class name="EditorToolsFile.xml" value=".test1" />    
     


    Regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
10 posts, 0 answered