Hi Andrew > 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 defined > so 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.
texteditoroperation’s are intended to do simple string manipulations, rather than direct manipulation of the textarea. The implementation of undo/redo that we had relied on a different mechanism; you can have a look back in the commit history to the commit where the feature was removed. Depending on what you’re trying to do, we may need to introduce a new mechanism. Best wishes Jeremy. > > > Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5 > > > > > -------- Original message -------- > From: Jeremy Ruston <[email protected] > <mailto:[email protected]>> > Date: 5/16/16 11:10 AM (GMT-07:00) > To: [email protected] <mailto:[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] >> <mailto:[email protected]>. >> To post to this group, send email to [email protected] >> <mailto:[email protected]>. >> Visit this group at https://groups.google.com/group/tiddlywiki >> <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 >> >> <https://groups.google.com/d/msgid/tiddlywiki/6ev5pmxalgx05b7vdugl8eul.1463352713728%40email.android.com?utm_medium=email&utm_source=footer>. >> For more options, visit https://groups.google.com/d/optout >> <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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/tiddlywiki > <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 > > <https://groups.google.com/d/msgid/tiddlywiki/2hbd676ccio9mgvy7ff8e51y.1463424482786%40email.android.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <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/B014B292-41E9-4B6C-ABE7-B33861CA795E%40gmail.com. For more options, visit https://groups.google.com/d/optout.

