August 29, 201411 yr Newbies I'm trying to use TinyMce in a webviewer in FileMaker but save the resulting HTML into a database field. I am aware of the standard practice of using an fmp:// link with a script & parameter, but that won't work in Windows (the html content returned as the parameter will likely exceed the 2048 character limit). I am using a javascript function to change the HTML DOM by putting the contents of the TinyMCE editor into another div on the page when the user clicks "Submit" inside the webviewer. However, when I use `GetLayoutObjectAttribute ( "webviewer" ; "Content" )` it shows the content of the unmodified (pre-javascript altered) page, not the page after javascript has modified the DOM. Sample file: http://cris.lc/sxti2 Is this expected behavior? Am I doing something incorrectly?
August 29, 201411 yr However, when I use `GetLayoutObjectAttribute ( "webviewer" ; "Content" )` it shows the content of the unmodified (pre-javascript altered) page, not the page after javascript has modified the DOM. Did you use that function in a script or in a calculated field?
August 29, 201411 yr GetLayoutObjectAttribute ( "webviewer" ; "content" ) is the equivalent of 'View Page Source' - so no access to the DOM. Have you thought of exploring HTML5's file-saving capability?
August 29, 201411 yr Hi Cristo, and welcome to the Forum, Sample file: http://cris.lc/sxti2 Please post your files here. This is a learning site, and files posted at other sites have a tendency to disappear once the OP has gotten a solution to their problem. To attach a file, just follow the steps in this Article. ATTACH FILE
October 3, 201411 yr There is a hack for getting around windows url length limit. You can find our more here http://www.seedcode.com/filemaker-webviewer-javascript-calculation-engine/ But basically you need to send the data to the clipboard with window.clipboardData.setData( 'Text' , mydata ); and then when you call your script, paste the text into a field.
Create an account or sign in to comment