close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Power cms and custom css

Thread began 12/08/2011 9:22 pm by chris400661 | Last modified 12/09/2011 2:01 pm by chris400661 | 1986 views | 1 replies

Jason ByrnesWebAssist

1) on the admin/contents_insert.php and admin/contents_update.php page, change the following code:

php:
$CKEditor_config["toolbar"] = array(

array( 'Source','DocProps','-','Save','NewPage','Preview','-','Templates'),
array( 'Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'),
array( 'Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
array( 'Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'),
array( 'Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'),
array( 'FitWindow','-','About'),
('/'),
array( 'Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
array( 'OrderedList','UnorderedList','-','Outdent','Indent'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
array( 'Link','Unlink','Anchor'),
('/'),
array( 'Style','FontFormat','FontName','FontSize'),
array( 'TextColor','BGColor'));



to:

php:
$CKEditor_config["toolbar"] = array(

array( 'Source','DocProps','-','Preview'),
array( 'Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker'),
array( 'Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
array( 'Image','Flash','Table','HorizontalRule','Smiley', 'SpecialChar','PageBreak'),
('/'),
array( 'Bold','Italic','Underline','Strike','-','Subscript','Superscript'),
array( 'NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'Link','Unlink','Anchor'),
('/'),
array( 'Styles','Format','Font','FontSize'),
array( 'TextColor','BGColor'),
array( 'Maximize','ShowBlocks'));




2) in the admin/contents_insert.php and admin/contents_update.php page

chagne the following code:

php:
$CKEditor->editor("ContentValue", $CKEditor_initialValue, $CKEditor_config);



to:

php:
$CKEditor_config["stylesCombo_stylesSet"] = "my_styles:style_lists/stylelist1.js";

$CKEditor->editor("ContentValue", $CKEditor_initialValue, $CKEditor_config);



3) in the admin/contents_insert.php and admin/contents_update.php page, add a reference to the style sheet, for example:
<link rel="stylesheet" type="text/css" href="../mycss.css"/>

4) Create a new folder in the webassist/ckeditor folder named "style_lists", inside that folder create a new js file named "stylelist1.js"


5) add the following code:

php:
CKEDITOR.addStylesSet("my_styles",

[    { name: "my red div",  element: "div",  ordered_list: [ "a:0" ],  attributes: { "class" : "myredclass" } },
    { name: "my blue div",  element: "div",  ordered_list: [ "a:0" ],  attributes: { "class" : "myblueclass" } },
]);



this will add two items to the style list:
my red div
my blue div

selecting my red div will add a div around the selected text with a class of "myredclass"
<div class="myredclass">selected text</div>


you can add other items to the style list using the same format of:
Name - what will be displayed in the list
Element - the type of element it applies to
attributes - how the style is added to the tag.


more details on the addStylesSet can be found here.
Styles

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...