Opened 14 years ago
Closed 10 years ago
#9616 closed enhancement (fixed)
pre-configure the height of wiki edit text area
Reported by: | 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 |
||
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)
Change History (15)
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
Component: | general → wiki system |
---|---|
Keywords: | userpreferences added |
Milestone: | → next-major-0.1X |
Severity: | normal → minor |
Version: | → 0.13dev |
comment:3 by , 14 years ago
Cc: | added |
---|
comment:4 by , 14 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Cc: | added |
---|
comment:6 by , 14 years ago
Cc: | added |
---|
comment:7 by , 14 years ago
Cc: | added |
---|
comment:8 by , 10 years ago
Keywords: | preferences added; userpreferences removed |
---|
comment:9 by , 10 years ago
Milestone: | next-major-releases → 1.1.5 |
---|---|
Owner: | set to |
Status: | new → assigned |
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 , 10 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 , 10 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): 57 57 max_size = IntOption('wiki', 'max_size', 262144, 58 58 """Maximum allowed wiki page size in characters.""") 59 59 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 60 64 PAGE_TEMPLATES_PREFIX = 'PageTemplates/' 61 65 DEFAULT_PAGE_TEMPLATE = 'DefaultPage' 62 66 … … class WikiModule(Component): 520 524 page.readonly = 'readonly' in req.args 521 525 522 526 author = get_reporter_id(req, 'author') 523 defaults = {'editrows': '20'}527 defaults = {'editrows': str(self.default_textarea_height)} 524 528 prefs = dict((key, req.session.get('wiki_%s' % key, defaults.get(key))) 525 529 for key in ('editrows', 'sidebyside'))
comment:12 by , 10 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 , 10 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed to trunk with option name from comment:12 in [14043].
Good idea.