Paste from MSWord

Anonymous
2003-12-16
2004-01-14
  • Anonymous - 2003-12-16

    Hi,
    can anyone point out how to make pasting from Word work (as plain text is fine)
    thanks

     
    • Karsten Pawlik

      Karsten Pawlik - 2004-01-12

      hi sascha,
      heres a short howto:

      CONTENTS:
      ---------
      1. what is jarsigner?
      2. why do i need to sign the applet?
      3. generating your own self-signed key
      4. signing the applet with your self-signed key

      1. WHAT IS JARSIGNER?
      ---------------------
      Jarsigner is the name of the program that comes with your java-SDK
      used to sign an applet.

      2. WHY DO I NEED TO SIGN THE APPLET?
      ------------------------------------
      Java protects your computer using a security architecture, that does
      not permit certain function calls to your pc if running an unsigned applet.

      these functions include:
      - drag and drop
      - cut/copy and paste (i.e.: accessing windows clipboard)
      - opening local files
      - exchanging data with an internet domain other than the one where
        the applet was loaded from

      If you do not need copy & paste or drag & drop, you do not need to
      sign the jar-file. if you do, please read on.

      3. GENERATING YOUR OWN SELF-SIGNED KEY
      --------------------------------------
      To sign your editor-applet, you need a certificate (key) that contains
      information about you, your organization and location. this certificate can
      either be obtained from a certificate authority (CA) like verisign (http://www.verisign.com)
      or thawte (http://www.thawte.com) or you can roll your own using the following steps.

      the differences between both are
      1. a matter of cost (official certificates cost money) and
      2. if you use a self-signed certificate, the popup of the applet will say that the
      applet was signed by an "untrusted" source (as it was not verified by an official CA).

      both methods however work after the certificate has accepted by the user.

      follow these steps to create your own certificate, if you do not already have one:
      - open a commandline window
      - make sure, that a program named keytool inside your java/bin-installation folder
        is in the PATH environment variable.
      - type in the following command:
      keytool -genkey -alias <your_key_alias_name> -validity <key_validity_period_in_days_starting_from_today>
      - enter the keystore-password of your java-keystore (if necessary)
      - enter the asked-for information
      - set a key-password or press enter if you want.

      example:
      the command:

      keytool -genkey -alias myApplet -validity 365

      will generate a key in your java-keystore with the alias "myApplet" that is valid for
      365 days from today. after 365 days you will then have to generate a new key.

      4. SIGNING THE APPLET WITH YOUR SELF-SIGNED KEY
      -----------------------------------------------
      - after creating your key in the java-keystore keep the commandline-window open.
      - change into the editor-applet's project-folder (i.e.: cd /java/javasource/applet)
      - make sure, that a program named jarsigner inside your java/bin-installation folder
        is in the PATH environment variable.
      - type in the following command:
      jarsigner <path_to_applet.jar> -alias <your_key_alias_name>
      - type in the passwords for the keystore and (if you set a different one for the key) the key

      example:
      the command:

      jarsigner dist/applet.jar -alias myApplet

      will sign the applet with the key that has the alias "myApplet" in the java-keystore.

      you are now ready to publish the .jar file to your webserver and use it.

       
    • Mike DOuglass

      Mike DOuglass - 2004-01-14

      I suspect the response (useful though it is) doesn't answer the real question.

      I think the question refers to the loss of formatting when pasting.

      A number of browser based editing tools will support pasting from msword etc because they can handle rich-text. (usually because they use the underlying browsers editing functions).

      I don't know if it's possible to easily support rich-text paste in an applet.

       
      • Maxym Mykhalchuk

        > I don't know if it's possible to easily support rich-text paste in an applet.

        It is possible, at least two commercial HTML editor applets (Sferyx and EPhox) allow pasting from MS Word, OpenOffice Writer and other rich-text native applications.

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks