Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

Using multiple textarea tags 5 years 9 months ago #5644

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
Using more than one <textarea> tag in a page seems to upset the editor display window. The first text box will appear in the Page Text editor panel, but any subsequent boxes will appear below the Page Text box as part of the editor window itself (and so can no longer be edited via HTML).

Please Inloggen or Create an account to join the conversation.

Using multiple textarea tags 5 years 9 months ago #5646

  • ronm
  • ronm's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 852
  • Thank you received: 261
Hi Neil
I can replicate this so will add it to the issues list. Hopefully we can find a fix for the next release but can you explain what you are trying to achieve?

e.g. in the meantime could you use the html view and add something like:
<p>
  <div class="mytextarea">
    mytextarea
</div>
</p>
<p>some other content
</p>
<p>
  <div class="mytextarea">
    mytextarea
</div>
</p>

and then in script:
$( ".mytextarea" ).replaceWith( "<textarea></textarea>" );

Not ideal but depends on what you are trying to achieve? e.g. would the documentation page help?

HTH
Ron
Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

Please Inloggen or Create an account to join the conversation.

Using multiple textarea tags 5 years 9 months ago #5649

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
I was trying to create table with empty cells where students have to fill in the blanks. It needed to be free text rather than drag and drop.

With a bit of playing this morning, I think I've managed to adapt the layout of the documentation page type enough to do what I need to do. You can see this here: xerte.cardiff.ac.uk/play_8549

Page 1 is the documentation page type, while page 2 is the manual table.

Please Inloggen or Create an account to join the conversation.

Using multiple textarea tags 5 years 1 month ago #5991

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
I ran into this problem again (I just wanted to add a single textbox), and tried your fix, but I get the same problem.

I'm guessing it's because the Xerte editor sees the closing </textarea> and thinks it relates to the editor window.

I tried escaping the code, but that does seem to work either.

Please Inloggen or Create an account to join the conversation.

Using multiple textarea tags 5 years 1 month ago #5994

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
OK, not that I think anyone else will likely need to do this, but here is my workaround:
var newname = 'textarea';
$( "#feedback" ).replaceWith( '<'+newname+'/>' );

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.050 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search