caspio Programing

Here is some code snippet to replace <br> to <p> tag in CKEDITOR

Below code will convert the normal textarea to ckeditor and will replace the breakline tag to paragraph tag on pressing enter.

<script type="text/javascript" src="https://c0abg481.caspio.com/scripts/CKEditor/ckeditor.js" ></script><script type="text/javascript">

CKEDITOR.editorConfig = function( config ) { config.toolbarGroups = [ { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] }, { name: 'forms', groups: [ 'forms' ] }, { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] }, { name: 'links', groups: [ 'links' ] }, { name: 'insert', groups: [ 'insert' ] }, { name: 'styles', groups: [ 'styles' ] }, { name: 'colors', groups: [ 'colors' ] }, { name: 'tools', groups: [ 'tools' ] }, { name: 'others', groups: [ 'others' ] }, { name: 'about', groups: [ 'about' ] } ];

config.removeButtons = 'Save,Templates,Cut,Undo,Find,Scayt,Form,Strike,Subscript,Superscript,CopyFormatting,RemoveFormat,Blockquote,CreateDiv,JustifyLeft,JustifyCenter,JustifyRight,JustifyBlock,BidiLtr,BidiRtl,Language,Anchor,Unlink,Link,Image,Flash,Table,HorizontalRule,Smiley,SpecialChar,PageBreak,Iframe,FontSize,Font,Format,Styles,TextColor,NewPage,Preview,Print,PasteText,Paste,Copy,Redo,PasteFromWord,Replace,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,BGColor,ShowBlocks,SelectAll,About';};

CKEDITOR.replace('InsertRecordAccountNote',{enterMode: CKEDITOR.ENTER_P});</script>

Ping me if there is work related to Caspio. thanks

Leave a Reply