--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/tnDhxZZLfdI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
class CKEditor(FormWidget): _class = 'ckeditor' @classmethod def widget(cls, field, value, **attributes): """ generates a TEXTAREA tag. see also: :meth:`FormWidget.widget` """ default = dict(value=value) attr = cls._attributes(field, default, **attributes) return TEXTAREA(**attr)
idb.define_table( 'module', Field('id', 'id', readable=False), ... Field('description', 'text', widget=CKEditor.widget)
)
def hideable_ckeditor_widget():
return SQLFORM.widgets.text.widget if 'new' in request.args or 'edit' in request.args else CKEditor.widget
idb.define_table(
--
<td id="cke_top_my_table_my_field" class="cke_top" role="presentation"><div class="cke_toolbox" role="group" aria-labelledby="cke_6" onmousedown="return false;"><span id="cke_6"
by this:
<td id="cke_top_my_table_my_field" class="cke_top hide" role="presentation"><div class="cke_toolbox" role="group" aria-labelledby="cke_6" onmousedown="return false;"><span id="cke_6"
then I woujld add this in the style definition of layout.html
.hide {display:none !important;}
and it would work...
Any suggestion on how I could add 'hide' in the class?
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.toolbarStartupExpanded = false; // added to callapse the top toolbar
};
or by adding this script in the views where you want to hide the top toolbar (more flexible, since you can easily control when it has to be triggered in the view)
<script>
window.onload = function hide_cke_top() {
var my_list = document.getElementsByClassName("cke_top"); // hide top tool bar.
for (var i = 0; i < my_list.length; i++) {
my_list[i].className += " " + "hide";
};
};
</script>
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.