5 Replies Latest reply on May 30, 2013 6:17 PM by LyndsayHowarth

    Text Formatting in IWP

    nicola

      Hi,

       

      Im looking for a solution for the following Problem. My client wants a

      business-solution that allows him to write letters in IWP. I am generating a PDF-File on the server and let him download this PDF.

       

      Now the client would like to format the text in his letters, like setting a word or a paragraph in bold or underline. I would like to put buttons like bold/underline/italic etc. into the layout as you can see in many webpages like here in the forum - on top of the textfield.

       

      I have made a script that uses the ActiveSelectionStart and ActiveSelectionSize to Cut out the Selection, put in in a globalfield and the put it back in place with the new format. It works nicely in Filemaker but apparently in IWP the ActiveSelection-Functions do not work properly - I always get the complete size of the fieldcontent as ActiveSelectionStart and than 0 for size.

       

      Does anyone have an idea how to to this in IWP, is there a plugin for it?

       

      Cheers

      Nicola

        • 1. Re: Text Formatting in IWP
          mikebeargie

          I don't know of any native text formatting functions that are IWP safe.

           

          Here's an article that details what you want to do via a web viewer:

          http://www.linearchat.co.uk/2011/09/text-formatting-in-iwp/

           

          Not sure if that's of any use to you. A web viewer would also open up some other web-service features as well that could be useful to your application.

          1 of 1 people found this helpful
          • 2. Re: Text Formatting in IWP
            steve_ssh

            Mike,

             

            That is a great link you've suggested.  Thank you.

             

            -steve

            • 3. Re: Text Formatting in IWP
              nicola

              Hi Mike, thank you very much for your suggestion. I´ve tried it out and it works perfectly on most of the layouts Unfortunately I have some layouts that contain 5 or more fields that need to be able to be formatted, it looks a bit full with all these text-editors here.

               

              I first thought I could just have one editor for the whole filemaker-layout, like just showing the filemaker-IWP-layout inside of the webviewer and having one editor around it but that obviously can't  be done - can it? Well, the we´re back at the original problem of not knowing which textstring is actually selected and is supposed to be formatted.

               

              Well then I probably have to rebuild the layout in html/php - well than the cool trick is not a trick anymore.

               

              Or do you have another idea here Mike?

               

              N.

              • 4. Re: Text Formatting in IWP
                mikebeargie

                Personally I'm more of a CWP guy and have steered pretty clear of IWP except for simple tasks, so unfortunately I don't really have any more suggestions.

                 

                Conceptually, I would say you need to load the blocks of text into a webviewer, then handle the ActiveSelectionStart/end with simlar javascript or web language functions.

                 

                You might be able to create a "helper" website hosted page that handles a passed text string. Then in IWP pass the text you need to into the web viewer using that helper page URL. you would then need to create a web scraping script for IWP that scraped out the text when done for a "save" button.

                 

                CWP is full of more robust capabilities, but also comes with the overhead of learning PHP and the filemaker CWP functionality.

                • 5. Re: Text Formatting in IWP
                  LyndsayHowarth

                  Agree...

                   

                  CWP would actually allow you to have a text editor much the same as we see here in TechNet.

                   

                  In IWP you could simulate the functions if you could get your client to learn a bit of basic HTML like <b>Word to be made bold</b> so that the html text is then interpreted for the PDF.

                   

                  - Lyndsay