Jonas
> Which editor are you using? WYMEditor or TinyMCE?
I was using TinyMCE, but have no particular preference, so I gave WMY a try. This at least got me a text editor widget which was full-width and resizes as I resize the browser window.
The next problem is that the editor is only 168px high (about 10 lines of text). I'm trying to figure out where I can make that larger. I found cms/static/cms/css/wymeditor.css, but there's nothing in there which looks like it does anything about setting the iframe height. Ditto for cms/plugins/text/settings.py.
I'll ask around on #djangocms.
Thanks for your help.
> They both have settings to configure them. Unfortunately those settings are currently undocumented (which is a bug, please open a ticket for this on github). So your best bet is either to ask on irc (#djangocms on freenode) or read the defaults in the source (sorry), they're in cms/plugins/text/settings.py or something like that.
>
> Jonas
--
Roy Smith
r...@panix.com
class Textarea(Widget):def __init__(self, attrs=None):# The 'rows' and 'cols' attributes are required for HTML correctness.default_attrs = {'cols': '40', 'rows': '10'}if attrs:default_attrs.update(attrs)super(Textarea, self).__init__(default_attrs)def render(self, name, value, attrs=None):if value is None: value = ''final_attrs = self.build_attrs(attrs, name=name)return mark_safe(u'<textarea%s>%s</textarea>' % (flatatt(final_attrs),conditional_escape(force_unicode(value))))
Hi,
> The dimensions of the editor widget depends on the TextArea widget it's
> based on, which is defined in django.forms.widgets
In your settings.py for tinymce if you want it to be 600px high:
TINYMCE_DEFAULT_CONFIG = {
...
"width": "100%",
"height": "600px",
...
}
Bye,
Frank
I'm just getting back to this project after a bit of a hiatus. I tried your suggestion above, but that results in "Caught KeyError while rendering: 'theme'" when I try to edit some text. After a little experimenting, I think the answer turns out that the "..." part is important :-) The following seems to work:
// init wysiwyg
$('#id_{{ name }}').wymeditor({
...
skinPath: "{{ STATIC_URL }}js/wymeditor/skins/django/",
...