Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Height for two wysiwyg-editors in one form #37

Open
mfa opened this issue Jun 29, 2013 · 3 comments
Open

Height for two wysiwyg-editors in one form #37

mfa opened this issue Jun 29, 2013 · 3 comments

Comments

@mfa
Copy link

mfa commented Jun 29, 2013

How can I set a different height for two YUI editors in the same form?

@vdboor
Copy link
Collaborator

vdboor commented Jul 5, 2013

django-wysiwyg looks for the editor configuration in two JavaScript variables:

  • django_wysiwyg_editor_configs[field_id]
  • django_wysiwyg_editor_config as fallback.

You can include a custom django_wysiwyg_editor_configs[field_id] = {...} block below the {% wysiwyg_setup }% tag to make this work.

@vdboor vdboor closed this as completed Jul 5, 2013
@vdboor
Copy link
Collaborator

vdboor commented Jul 5, 2013

reopening for needs-documentation marker.

@vdboor vdboor reopened this Jul 5, 2013
@mfa
Copy link
Author

mfa commented Jul 5, 2013

thx for the help.
I solved my issue like this:

 django_wysiwyg_editor_configs["id_field1"] = django_wysiwyg_editor_config;
 django_wysiwyg_editor_configs["id_field1"]["height"] = "200px";
 django_wysiwyg_editor_configs["id_field2"] = $.extend({}, django_wysiwyg_editor_config);
 django_wysiwyg_editor_configs["id_field2"]["height"] = "500px";

jquery.extend is needed to get a copy of django_wysiwyg_editor_config.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants