Thank you for a super quick reply jeremy. I tried it an I must still be doing
something wrong because I got error parentDomNode is not definedso it must
needs to be how do you say added as dot notation on the end of document or
window or operation or something. I'm trying to access it from a module-type:
texteditoroperation.I take it that I may have to do a require something in
order to do a parentDomNode call? I sense I not inheriting the method? Sorry, I
really don't know how the architecture works, still foggy on that.
Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
-------- Original message --------
From: Jeremy Ruston <[email protected]>
Date: 5/16/16 11:10 AM (GMT-07:00)
To: [email protected]
Subject: Re: [tw] [TW5] How to get hidden textarea value
Hi Andrew
With the new editor toolbar in the prerelease of 5.1.12, a new iframe & hidden
textarea are introduced for the text field so that selection can be preserved.
I used to be able to use parentDomNode.getElementsByTagName("textarea")[0]; to
get the textarea value but that is changing. In developer tools I can inspect
and find the value of the textarea under properties under textarea under value
but I can't figure out how to get the value. Maybe because it's hidden? The
undo and redo buttons are not being included because they were not acting
properly. I feel that if I could capture the text after the execCommand to
undo, I could assign it to operation.replacement and then use the editor engine
to update the preview pane. Maybe then the undo and redo buttons could be added
back in under a plugin. Any suggestions?
You’ll need to reach into the textarea within the iframe, something like this:
parentDomNode.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("textarea")[0].value
Best wishes
Jeremy
Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6ev5pmxalgx05b7vdugl8eul.1463352713728%40email.android.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/2hbd676ccio9mgvy7ff8e51y.1463424482786%40email.android.com.
For more options, visit https://groups.google.com/d/optout.