Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris 92 posts 238 karma points
    Mar 30, 2015 @ 09:04
    Chris
    0

    Custom font-familys/remove Buttons properties ain't working

    Hey,

    so far I love this editor, in my opinion much nicer than the standart RTE of umbraco. Also with the tips and changes of marco in this thread I managed to run the uCKEditor in the grid layout of umbraco.

    But now I'm struggling with the settings of the editor. I try to set other default font-familys for the content-editor to choose from but won't get it to work.

    When creating a data type of "uCKEditor" I get diffrent textareas/fields to enter settings which I'd like to use:

     

    I also tried to seperate the font-names with a "," but won't get it to work.

    Also when uCKEditor was installed there was a default setting for "RemoveButton": 

    NewPage,Preview,Templates,Save,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Flash,IFrame

    When I unterstand it correctly it should remove the buttons from the editor when used by the content-editor, but those setting also didn't work.

     

    Am I doing something wrong here? Do I need to edit a config file in the uCKEditor folder?

    Christoph

  • Alain 73 posts 520 karma points c-trib
    Mar 30, 2015 @ 11:02
    Alain
    0

    Hi Christoph,

    I am going to remove the settings textboxes in future versions of uCKEditor since they can cause some problems. For instance it happened that a user had copied and pasted a settings section from the official CKEditor examples, including the comments "//", and it seems they are incompatible with angular, what broked the property editor, requiring removing those comments manually from the database.

    I think it is better to have a config.js file for each editor (or shared by more than one editor) in the Umbraco ~/config/ directory, what allows you to copy and paste any settings examples from the official CKeditor web page.

    This is the official documentation for the font names: http://docs.cksource.com/ckeditorapi/symbols/CKEDITOR.config.html#.fontnames

    e.g:

    CKEDITOR.editorConfig = function (config) {
        config.language = 'en';
        config.removeButtons = "NewPage, Preview, Templates, Save, Form, Checkbox, Radio, TextField, Textarea, Select, Button, ImageButton, HiddenField, Flash, IFrame";
        config.font_names = 'Arial;Times New Roman;Verdana';
    };
    

    Save the settings above into a config file (for example news.js) into the directory ~/config/uCKEditor/ (I think it is a good practice to have a subfolder for the uCKEditor settings config files, in order to avoid a messy config directory):

    ~/config/uCKEditor/news.js

    enter image description here

    That should work.

    Alain

  • Chris 92 posts 238 karma points
    Mar 30, 2015 @ 13:19
    Chris
    0

    Hey Alain,

    thanks for the answer for now but still won't work for me.

    I simply copied the code you posted above and created a new "uckeditor.js" under umbraco/config/uckeditor/uckeditor.js. In the umbraco Backend I add the path to the UCKEditor datatype settings (and add no other configurations/settings beside the path) but it still shows me always the standart configs.

    I noticed in the docu that there should be a file in uCKEditor/uCKEditor/plugins/font/plugins.js which for me doesn't exist.

    Because of the workaround to get the editor running in the grid-layout I have in umbraco/App_Plugins two uCKEditor folders, one from the normal installation (uCKEditor) and the other from the thread mentioned above (uCKEditor.grid). Could this be the problem?

  • Alain 73 posts 520 karma points c-trib
    Mar 30, 2015 @ 15:36
    Alain
    0

    Christoph,

    The latest version of uCKEditor doesn't use embedded files anymore, what means that after installing the package, all the files are available in the folder ~/App_Plugins/uCKEditor/. You should use these files instead of using the ones from the the thread mentioned above.

    uCKEditor is not designed (yet :) to work with the Umbraco grid. I did a quick fix last time in order to allow you to use it, but I didn't test it exhaustively.

    My recommendation is to install the latest version of the package (V1.1.0) and use uCKEditor as a "normal" property editor and check that your custom settings are working properly. If so, then copy all files from the folder ~/App_Plugins/uCKEditor/ to your "grid version of uckeditor" folder. Then try if it works properly in the umbraco grid. If it doesn't work, that means there is some incompatibility that I will try to fix as soon as I get a chance.

    Please could you check if there are any errors in the browser's console.

    Cheers, Alain

Please Sign in or register to post replies

Write your reply to:

Draft