PDA

View Full Version : fckeditor toolbar



Andreas_M
October 1, 2012, 06:01 PM
Hello,


I am trying to change the toolbar of the frontpage fckeditor. Want to add some functions and remove the source/html button.
Changes in > includes > class > rlSmarty.class.php didnt worked for front end editor.



$toolbar['Basic'] = array(
array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ),
array( 'Image', 'Flash', 'Link', 'Unlink', 'Anchor' ),
array( 'Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'),
array( 'TextColor', 'BGColor' )
);


Best regards
Andreas

Vladimir
October 2, 2012, 03:44 AM
Hello,

You can try to change it in the file: libs/javascript/flynax.lib.js -> method htmlEditor (~line 1050).

Andreas_M
October 2, 2012, 06:28 PM
Hello,


thanks. But did not worked with 'OrderedList', 'UnorderedList'?

Andreas_M
October 3, 2012, 12:25 PM
Will be there a possibility to add 'OrderedList', 'UnorderedList' and that the list-style would be visible?

At the moment every list-style is invisible, cause of the template.
If I assign a style like "disk" or something else, there are scattered discs all over the template like at menus etc..

I want that users can make lists/enumerations in a description field on listing detail page.
Maybe there is a hack to do that?

Steffen Buschkemper
October 3, 2012, 12:59 PM
Hi Andreas,

i hope this is what you need.
Open libs/javascript/flynax.lib.js -> method htmlEditor

modify the follow code



var configs = {
toolbar: [
['Source', '-', 'Bold', 'Italic', 'Underline', 'Strike'],
['Link', 'Unlink', 'Anchor'],
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
['TextColor', 'BGColor'],
],


for List



var configs = {
toolbar: [
['Source', '-', 'Bold', 'Italic', 'Underline', 'Strike'],
['Link', 'Unlink', 'Anchor'],
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
['TextColor', 'BGColor'],
['NumberedList','BulletedList']
],


Now all of this must still formatted with css in style.css
e.g adverts description:



table.table > tbody > tr#df_field_description_add > td.value ol li{
list-style: decimal;
}

table.table > tbody > tr#df_field_description_add > td.value ul li{
list-style: disc;
}


thats all and its also for frontend...

Best regards
Steffen

Petrache Nicolae
October 3, 2012, 02:13 PM
let us know it that is working for you. thanks

Andreas_M
October 3, 2012, 05:31 PM
Hello Steffen,


thanks for your help. It works very well, but not for the ul li. It works only for numbered lists...

Now there also appears the following language short something, first before text: {|de|}
The description field is multi-language and I entered just in the german field, but that did not happened before. Maybe its just an accident, but did someone had the same with other languages?


Best regards
Andreas

Andreas_M
October 3, 2012, 05:35 PM
I forgot something.
I tested it on a mac with Firefox and Safari browser. In Firefox the toolbar looks normal but in Safari the toolbar is arranged just in one line.
Is it possible to make a break and sort the toolbar in two lines?


***found the separator: just add '/', where you want to make a break.


var configs = {
toolbar: [
['Undo', 'Redo','-', 'Bold', 'Italic', 'Underline', 'Strike'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull'],
['TextColor', 'BGColor'],
['Cut', 'Copy', 'Paste','-','Find', 'Replace',],
'/',
['Table','Outdent','Indent','SelectAll', 'RemoveFormat'],
['NumberedList','BulletedList']


],

Andreas_M
October 6, 2012, 11:40 AM
Hello,


I tried so many ways, but the unordered list don not show any styles, like disc or decimal.
I can changed the style type of the ordered list an it works with Steffens code. But

#df_field_description_add .value ul li{
list-style-type: circle;
}

is not working for me. Can please someone else test it?
Normally it should work, because it is correctly defined.

Steffen, do you have any other idea?


Best regards
Andreas

Steffen Buschkemper
October 6, 2012, 03:01 PM
Hi Andreas,

now the problem is follow.
The CSS code of Flynax is not optimal!

In style.css i found a reset for ul li css code!



ul,
li
{
margin:0;
padding:0;
list-style: none;
}


and this is the reset part



margin:0;
padding:0;


Therefore ul not displayed!
A solution to the problem is very complicated.
The reset must be defined more specifically as where it is needed!

A lot of work! The CSS should be revised...

Best regards
Steffen

Andreas_M
October 6, 2012, 09:17 PM
Hi Steffen,


I thought that the new css code for fields would work, because the selected definition.

So if it does not work, then another trick has to be found:

I changed the numbered list icon (/libs/ckeditor/skins/kama/icons.png) to the bulleted list and select "disc" for list style at style.css.
I think that would be the easiest way.
Users can now entered numbered list by doing it manually and if they want bulleted lists, they got the perfect illusion.
Now at the frontpage the numbered list looks like bulleted list with disc.

At last I just need to change the list-style in editing mode/view, but I did not found where to change it.
Do someone know where I can change the list-style from decimal to disc?

Best regards
Andreas