Web2py ckEditor

175 views
Skip to first unread message

Sharjeel Ali Shaukat

unread,
Jun 18, 2014, 5:56:48 AM6/18/14
to web...@googlegroups.com
i m using ckeditor here i want to show runtime preview in div and also using its options  like Bold button dont highlights the text and  are not working perfectly

Tim Richardson

unread,
Jun 18, 2014, 6:53:57 AM6/18/14
to web...@googlegroups.com
Which plugin from web2pyslices are you using?
Also, can you be more clear about the problem. 

Sharjeel Ali Shaukat

unread,
Jun 19, 2014, 7:01:58 AM6/19/14
to web...@googlegroups.com

i m using ckeditor from web2slices

Tim Richardson

unread,
Jun 19, 2014, 7:31:21 PM6/19/14
to web...@googlegroups.com
OK, I hope that I can help with that.

I don't know what you mean by "show runtime preview in div". The editor is designed to be "attached" to certain fields in a form, as instructed in the web2py slices page.

The editor works fine as the plugin instructs, when used in the browsers that I have used. 
What browser are you using it in, what version of web2py, and how have you configured it?
How did you install it? 

Alex Glaros

unread,
Mar 4, 2015, 6:27:28 PM3/4/15
to web...@googlegroups.com
hi Tim

how do I install ck_editor?

assume I don't know what directory to use or anything else

thanks!

Alex

Massimo Di Pierro

unread,
Mar 5, 2015, 6:30:55 PM3/5/15
to web...@googlegroups.com
it js so it would go into applications/yourapp/static/

Dmitry Ermolaev

unread,
Apr 21, 2015, 6:59:01 AM4/21/15
to web...@googlegroups.com
How use ckeditor in FORM - not SQLFORM ??

среда, 18 июня 2014 г., 12:56:48 UTC+3 пользователь Sharjeel Ali Shaukat написал:

Jim S

unread,
Apr 21, 2015, 9:07:42 AM4/21/15
to web...@googlegroups.com
1. Go here http://ckeditor.com/download and download CKEditor.  I just use the Standard Package.

2. Open the zip file that you downloaded and copy the entire ckeditor folder to web2py/applications/your_app/static/js

3. Add this line to your layout.html after jquery is loaded

<script src="{{=URL('static', 'js/ckeditor/ckeditor.js')}}"></script>

To use ckeditor you are going to replace a textarea control with ckeditor.  To do so, add the following to your view:

<script type="text/javascript">
    $(document).ready(function() {
        CKEDITOR.replace('comment');
    });
</script>

comment is the 'name' of the textarea control I'm replacing.

Use firebug to figure out what the name of your textarea control is.

Lots of documentation available here:  http://docs.ckeditor.com/#!/guide

Hope this helps.

-Jim
Reply all
Reply to author
Forward
0 new messages