Create your blog and photo album with postbit
Create your blog and photo album

Create new post

Content:

Upload a picture:
Tags (keywords separated by comma)

Save Cancel
The JavaScript Blog js:   Followers: 3 ; Following: 3

Explore The JavaScript Blog's photo albums:
Photos from posts (7)
Javascript tools (2)

CKEditor - Online HTML Editor for web pages



CKEditor is the online HTML editor used by Postbit to edit posts and photo descriptions.

CKEditor online demo: http://ckeditor.com/demo

Some CKEditor hints:

Toolbar default configuration is in the file: http://ckeditor.com/apps/ckeditor/3.6.5/ckeditor.js

CKEditor Toolbar Basic:
i.toolbar_Basic = [['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];

CKEditor Toolbar Full:
i.toolbar_Full = [
{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},
{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},
{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},
{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',
{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},
{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},
{name:'links',items:['Link','Unlink','Anchor']},
{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',
{name:'styles',items:['Styles','Format','Font','FontSize']},
{name:'colors',items:['TextColor','BGColor']},
{name:'tools',items:['Maximize','ShowBlocks','-','About']}
];

How to customize the "save button" from the toolbar (default function is to submit the form):

  CKEDITOR.plugins.registered['save'] = {
    init : function( editor ) {
      var command = editor.addCommand( 'save',
          {
             modes : { wysiwyg:1, source:1 },
             exec : function( editor ) { // Add here custom function for the save button
               alert('You clicked the save button in CKEditor toolbar!');
             }
          }
      );
      editor.ui.addButton( 'Save',{label : 'Save',command : 'save'});
    }
  }


But when you need just to edit javascript code online, always use js.do - the online javascript editor

 

Post by The JavaScript Blog (2012-10-24 18:10)

Post your comment:

Name: Email: Site:




| Explore users | New posts | Create your blog | Create your photo album |
| About Postbit | Our blog | Terms of use | Contact Postbit |


Copyright © 2017 - postbit.com