Display textarea without editor

Display textarea without editor

by Gordon McLeod -
Number of replies: 2

Hello,

I'm looking for a way to display multi-row text entry boxes within a database activity just as textboxes, rather that having the editor controls displayed. I used textarea fields as I wanted multiple line entries, but as you'll see from the screenshot the wysiwyg editor actually takes up more space than the 5 line box that I want to display.

I was hoping to use the CSS template within database activity to specify not to display the text editor as changing the core code isn't an option, but can anyone point me in the right direction for what would need to be written in the css section - or if there's an alternative?

Thanks, Gordon.

Attachment db_activity_wysiwyg.jpg
Average of ratings: -
In reply to Gordon McLeod

Re: Display textarea without editor

by Itamar Tzadok -

Not sure that this is possible with css only.

There is a long standing tracker issue for that MDL-8773. There is a link there to a patch for a simple textarea field type. In the Dataform I've enhanced the textare field type to allow turning off the editor in the field settings. I've just drafted a possible similar enhancement to the Database Textarea field and time permitting will propose it for integration.

If you do html and javascript you can create textarea directly in the template html, use 1 or more Database Text fields to store the content in and hide them in the template (e.g. by style=display:none), then use javascript in the edit tab to copy the content from the textareas to the designated text field(s) and in the view tab to parse the content from the text field for the display.

hth smile

 

 

 

 

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Display textarea without editor

by Gordon McLeod -

Hello Itamar,

Many thanks. The tracker issue you mentioned has the workaround solution that includes a combination of css and javascript and does exactly what I was looking for - but longer term I'll be looking to have dataform enabled as it seems much better suited to the range of activities we are doing with databases.

Regards, Gordon.