Edgewall Software
Modify

Opened 14 years ago

Closed 9 years ago

#9616 closed enhancement (fixed)

pre-configure the height of wiki edit text area

Reported by: team@… Owned by: Ryan J Ollos
Priority: normal Milestone: 1.1.5
Component: wiki system Version: 0.13dev
Severity: minor Keywords: preferences
Cc: kirean@…, leho@…, martin@…, lists@…, hejda.cz@…, lloyd@… Branch:
Release Notes:

The option [wiki] default_edit_area_height is used when a value for editrows hasn't been saved in the session attributes.

API Changes:
Internal Changes:

Description

Would be nice to have an ability to change the default height of text area for wiki pages (and for tickets also, maybe). Now it's 8 rows by default, and I have to change it manually for bigger value. Would be nice to specify it in trac.ini:

[trac]
default_textarea_height=16

Maybe it's already possible, but I didn't find anything like this in the documentation. Thanks.

Attachments (2)

patch.9616 (1.3 KB ) - added by Carsten Klein <trancesilken@…> 9 years ago.
Adds [wiki] edit_rows setting to wiki
patch.2.9616 (847 bytes ) - added by Carsten Klein <trancesilken@…> 9 years ago.
Adds [wiki] edit_rows setting to wiki

Download all attachments as: .zip

Change History (15)

comment:1 by Erik Andersson <kirean@…>, 14 years ago

Cc: kirean@… added

comment:2 by Christian Boos, 14 years ago

Component: generalwiki system
Keywords: userpreferences added
Milestone: next-major-0.1X
Severity: normalminor
Version: 0.13dev

Good idea.

comment:3 by lkraav <leho@…>, 14 years ago

Cc: leho@… added

comment:4 by Martin Scharrer <martin@…>, 14 years ago

Cc: martin@… added

comment:5 by Thijs Triemstra <lists@…>, 14 years ago

Cc: lists@… added

comment:6 by Tomáš Hejátko <hejda.cz@…>, 13 years ago

Cc: hejda.cz@… added

comment:7 by lloyd@…, 13 years ago

Cc: lloyd@… added

comment:8 by Ryan J Ollos, 10 years ago

Keywords: preferences added; userpreferences removed

by Carsten Klein <trancesilken@…>, 9 years ago

Attachment: patch.9616 added

Adds [wiki] edit_rows setting to wiki

by Carsten Klein <trancesilken@…>, 9 years ago

Attachment: patch.2.9616 added

Adds [wiki] edit_rows setting to wiki

comment:9 by Ryan J Ollos, 9 years ago

Milestone: next-major-releases1.1.5
Owner: set to Ryan J Ollos
Status: newassigned

The change sounds fine to me, but we should be more clear with the option name: default_textarea_height as suggested in comment:description, default_editor_height or at least default_edit_rows.

comment:10 by Jun Omae, 9 years ago

The 'editrows' item in defaults variable should be a str instance.

-        defaults = {'editrows': '20'}
+        defaults = {'editrows': str(self.default_edit_rows)}

See #11799.

comment:11 by Ryan J Ollos, 9 years ago

Release Notes: modified (diff)

Revised patch:

  • trac/wiki/web_ui.py

    diff --git a/trac/wiki/web_ui.py b/trac/wiki/web_ui.py
    index 754f0c5..6a6d14b 100644
    a b class WikiModule(Component):  
    5757    max_size = IntOption('wiki', 'max_size', 262144,
    5858        """Maximum allowed wiki page size in characters.""")
    5959
     60    default_textarea_height = IntOption('wiki', 'default_textarea_height', 20,
     61        """Default height of the textarea on the wiki edit page.
     62        (//Since 1.1.5//)""")
     63
    6064    PAGE_TEMPLATES_PREFIX = 'PageTemplates/'
    6165    DEFAULT_PAGE_TEMPLATE = 'DefaultPage'
    6266
    class WikiModule(Component):  
    520524            page.readonly = 'readonly' in req.args
    521525
    522526        author = get_reporter_id(req, 'author')
    523         defaults = {'editrows': '20'}
     527        defaults = {'editrows': str(self.default_textarea_height)}
    524528        prefs = dict((key, req.session.get('wiki_%s' % key, defaults.get(key)))
    525529                     for key in ('editrows', 'sidebyside'))

comment:12 by Ryan J Ollos, 9 years ago

The wiki edit page uses the label Adjust edit area height, so I'm considering if a better option name would be default_edit_area_height.

comment:13 by Ryan J Ollos, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to trunk with option name from comment:12 in [14043].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.