├── .gitignore
├── LICENSE.txt
├── README-Localized
├── README-de-de.md
├── README-es-es.md
├── README-fr-fr.md
├── README-ja-jp.md
├── README-pt-br.md
├── README-ru-ru.md
├── README-zh-cn.md
└── README-zh-tw.md
├── ReadMe.md
├── Word-Add-in-TypeScript-Canvas.yml
├── gen-cert.sh
├── gulpfile.config.json
├── gulpfile.js
├── manifest-word-add-in-canvas.xml
├── package.json
├── readme-images
└── Word-Add-in-TypeScript-Canvas.gif
├── src
├── index.html
├── insertimage.html
├── media
│ ├── groupIcon1_default16.png
│ ├── groupIcon1_default32.png
│ ├── groupIcon1_default80.png
│ ├── icon_default16.png
│ ├── icon_default32.png
│ ├── icon_default80.png
│ └── map.png
├── sample.ts
└── styles.scss
├── tsconfig.json
└── typings.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/osx,windows
2 |
3 | ### OSX ###
4 | .DS_Store
5 | .AppleDouble
6 | .LSOverride
7 |
8 | # Icon must end with two \r
9 | Icon
10 |
11 |
12 | # Thumbnails
13 | ._*
14 |
15 | # Files that might appear in the root of a volume
16 | .DocumentRevisions-V100
17 | .fseventsd
18 | .Spotlight-V100
19 | .TemporaryItems
20 | .Trashes
21 | .VolumeIcon.icns
22 |
23 | # Directories potentially created on remote AFP share
24 | .AppleDB
25 | .AppleDesktop
26 | Network Trash Folder
27 | Temporary Items
28 | .apdisk
29 |
30 |
31 | ### Windows ###
32 | # Windows image file caches
33 | Thumbs.db
34 | ehthumbs.db
35 |
36 | # Folder config file
37 | Desktop.ini
38 |
39 | # Recycle Bin used on file shares
40 | $RECYCLE.BIN/
41 |
42 | # Windows Installer files
43 | *.cab
44 | *.msi
45 | *.msm
46 | *.msp
47 |
48 | # Windows shortcuts
49 | *.lnk
50 |
51 | # Ignore the following folders
52 | node_modules/**
53 | bower_components/**
54 | www/**
55 | platforms/**
56 | typings/**
57 | obj/**
58 | bld/**
59 | bin/**
60 | .vs/
61 |
62 | # Ignore the cert and key file
63 | *.crt
64 | *.key
65 | *.csr
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) Microsoft Corporation
2 | All rights reserved.
3 |
4 | MIT License:
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README-Localized/README-de-de.md:
--------------------------------------------------------------------------------
1 | # Word-Add-In-Beispiel für Bildbeschriftungen: Laden, Bearbeiten und Einfügen von Bildern
2 |
3 | **Inhaltsverzeichnis**
4 |
5 | * [Zusammenfassung](#summary)
6 | * [Erforderliche Tools](#required-tools)
7 | * [Installieren von Zertifikaten](#how-to-install-certificates)
8 | * [Einrichten und Ausführen der App](#how-to-set-up-and-run-the-app)
9 | * [Ausführen des Add-Ins in Word 2016 unter Windows](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [Häufig gestellte Fragen](#faq)
11 | * [Fragen und Kommentare](#questions-and-comments)
12 | * [Weitere Informationen](#learn-more)
13 |
14 |
15 | ## Zusammenfassung
16 |
17 | In diesem Word-Add-in-Beispiel wird gezeigt, wie folgende Aktionen ausführen:
18 |
19 | 1. Erstellen eines Word-Add-Ins mit TypeScript
20 | 2. Laden von Bildern aus dem Dokument in das Add-In
21 | 3. Bearbeiten von Bildern im Add-In mithilfe der HTML Canvas-API und Einfügen von Bildern im Word-Dokument
22 | 4. Implementieren von Add-In-Befehlen zum Starten eines Add-Ins im Menüband und zum Ausführen eines Skripts im Menüband und über ein Kontextmenü
23 | 5. Verwenden der Office-UI-Fabric zum Erstellen einer systemeigenen Word-Umgebung für das Add-In
24 |
25 | 
26 |
27 | Definition eines **Add-In-Befehls**: Eine Erweiterung der Word-Benutzeroberfläche, mit dem Sie das Add-In in einem Aufgabenbereich starten oder ein Skript im Menüband oder über ein Kontextmenü ausführen können.
28 |
29 | Wenn Sie dies in Aktion sehen möchten, fahren Sie mit [Einrichten von Word 2016 unter Windows](#word-2016-for-windows-set-up) fort, und verwenden Sie dieses [Manifest](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml).
30 |
31 | ## Erforderliche Tools
32 |
33 | Für die Verwendung des Word-Add-In-Beispiels für Bildbeschriftungen gelten folgende Anforderungen.
34 |
35 | * Word 2016 16.0.6326.0000 oder höher oder beliebiger Client, der die Javascript-API für Word unterstützt. In diesem Beispiel wird eine Prüfung der Anforderungen durchgeführt, um zu sehen, ob dieses in einem unterstützten Host für die JavaScript-APIs ausgeführt wird.
36 | * npm (https://www.npmjs.com/) zum Installieren der Abhängigkeiten. Es ist im Lieferumfang von [NodeJS](https://nodejs.org/en/) enthalten.
37 | * (Windows) [Git Bash](http://www.git-scm.com/downloads).
38 | * Klonen Sie dieses Repository auf ihrem lokalen Computer.
39 |
40 | > Hinweis: Word für Mac 2016 unterstützt derzeit keine Add-In-Befehle. Dieses Beispiel kann auf dem Mac ohne die Add-In-Befehle ausgeführt werden.
41 |
42 | ## Installieren von Zertifikaten
43 |
44 | Sie benötigen ein Zertifikat, um dieses Beispiel auszuführen. Da Add-In-Befehle HTTPS erfordern und ohne Oberfläche sind, können Sie keine ungültigen Zertifikate akzeptieren. Führen Sie [./gen-cert.sh](#gen-cert.sh) aus, um das Zertifikat zu erstellen, und installieren Sie dann „ca.crt“ im Speicher mit vertrauenswürdigen Stammzertifizierungsstellen (Windows).
45 |
46 | ## Einrichten und Ausführen der App
47 |
48 | 1. Installieren Sie den TypeScript-Definitions-Manager, indem Sie ```npm install typings -g``` in der Befehlszeile eingeben.
49 | 2. Installieren Sie die in der Datei „typings.json“ identifizierten TypeScript-Definitionen, indem Sie ```typings install``` im Stammverzeichnis des Projekts in der Befehlszeile ausführen.
50 | 3. Installieren Sie die in der Datei „package.json“ identifizierten Projektabhängigkeiten, indem Sie ```npm install``` im Stammverzeichnis des Projekts ausführen.
51 | 4. Installieren Sie gulp ```npm install -g gulp```.
52 | 5. Kopieren Sie die Fabric- und JQuery-Dateien, indem Sie ```gulp copy:libs``` ausführen. (Windows) Wenn dabei ein Problem auftritt, stellen Sie sicher, dass *%APPDATA%\npm* in der path-Variablen enthalten ist.
53 | 6. Führen Sie die gulp-Standardaufgabe aus, indem Sie ```gulp``` im Stammverzeichnis des Projekts ausführen. Wenn die TypeScript-Definitionen nicht aktualisiert sind, tritt dabei ein Fehler auf.
54 |
55 | Sie haben nun dieses Beispiel-Add-In bereitgestellt. Jetzt müssen Sie Word mitteilen, wo es das Add-In finden kann.
56 |
57 | ### Einrichtung von Word 2016 unter Windows
58 |
59 | 1. (Nur Windows) Extrahieren und führen Sie diesen [Registrierungsschlüssel](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark) aus, um die Add-In-Befehle zu aktivieren. Dies ist erforderlich, solange Add-In-Befehle eine **Vorschaufunktion** sind.
60 | 2. Erstellen Sie eine Netzwerkfreigabe oder [geben Sie einen Ordner im Netzwerk frei](https://technet.microsoft.com/en-us/library/cc770880.aspx), und platzieren Sie die [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml)-Manifestdatei darin.
61 | 3. Starten Sie Word, und öffnen Sie ein Dokument.
62 | 4. Klicken Sie auf die Registerkarte **Datei**, und klicken Sie dann auf **Optionen**.
63 | 5. Wählen Sie **Sicherheitscenter** aus, und klicken Sie dann auf die Schaltfläche **Einstellungen für das Sicherheitscenter**.
64 | 6. Wählen Sie **Vertrauenswürdige Add-In-Kataloge** aus.
65 | 7. Geben Sie in das Feld **Katalog-URL** den Netzwerkpfad zur Ordnerfreigabe an, die die Datei „manifest-word-add-in-canvas.xml“ enthält, und wählen Sie dann **Katalog hinzufügen**.
66 | 8. Aktivieren Sie das Kontrollkästchen **Im Menü anzeigen**, und klicken Sie dann auf **OK**.
67 | 9. Es wird eine Meldung angezeigt, dass Ihre Einstellungen angewendet werden, wenn Sie Office das nächste Mal starten.
68 |
69 | ## Ausführen des Add-Ins in Word 2016 unter Windows
70 |
71 | 1. Öffnen Sie ein Word-Dokument.
72 | 2. Klicken Sie auf der Registerkarte **Einfügen** in Word 2016 auf **Meine-Add-Ins**.
73 | 3. Klicken Sie auf die Registerkarte **Freigegebener Ordner**.
74 | 4. Wählen Sie das **Add-In für Bildbeschriftungen**, und wählen Sie dann **Einfügen**.
75 | 5. Wenn Add-In-Befehle von Ihrer Word-Version unterstützt werden, werden Sie in der Benutzeroberfläche darüber informiert, dass das Add-In geladen wurde. Sie können die Registerkarte **Add-In für Beschriftungen** verwenden, um das Add-In in der Benutzeroberfläche zu laden und ein Bild in das Dokument einzufügen. Sie können auch mit der rechten Maustaste im Kontextmenü klicken, um ein Bild in das Dokument einzufügen.
76 | 6. Wenn Add-In-Befehle von Ihrer Version von Word nicht unterstützt werden, wird das Add-In in einem Aufgabenbereich geladen. Sie müssen ein Bild in das Word-Dokument einfügen, um diese Funktion des Add-Ins zu verwenden.
77 | 7. Wählen Sie ein Bild im Word-Dokument, und laden Sie es im Aufgabenbereich durch Wählen von *Bild aus Dokument laden*. Jetzt können Sie Beschriftungen im Bild einfügen. Wählen Sie *Bild im Dokument einfügen*, um das aktualisierte Bild im Word-Dokument einzufügen. Das Add-In generiert Platzhalterbeschreibungen für alle Beschriftungen.
78 |
79 | ## Häufig gestellte Fragen
80 |
81 | * Funktionieren Add-In-Befehle auf dem Mac und iPad? Nein, sie funktionieren seit der Veröffentlichung dieser Readme-Datei nicht auf dem Mac oder iPad.
82 | * Warum wird mein Add-In nicht im Fenster **Meine Add-Ins** angezeigt? Möglicherweise weist das Add-In-Manifest einen Fehler auf. Es wird empfohlen, die Manifestdatei anhand des [Manifestdateischemas](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD) zu prüfen.
83 | * Warum wird die Funktionsdatei nicht für meine Add-In-Befehle aufgerufen? Add-In-Befehle erfordern HTTPS. Da Add-In-Befehle TLS erfordern une es keine Benutzeroberfläche gibt, können Sie nicht sehen, ob ein Problem mit dem Zertifikat besteht. Wenn Sie ein ungültiges Zertifikat im Aufgabenbereich akzeptieren müssen, funktioniert der Add-In-Befehl nicht.
84 | * Warum reagieren die npm-Installationsbefehle nicht? Dies trifft wahrscheinlich nicht zu. Dies nimmt unter Windows lediglich einige Zeit in Anspruch.
85 |
86 | ## Fragen und Kommentare
87 |
88 | Wir schätzen Ihr Feedback hinsichtlich des Word-Add-In-Beispiels für Bildbeschriftungen. Sie können uns Ihre Fragen und Vorschläge über den Abschnitt [Probleme](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues) dieses Repositorys senden.
89 |
90 | Allgemeine Fragen zur Add-In-Entwicklung sollten in [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API) gestellt werden. Stellen Sie sicher, dass Ihre Fragen oder Kommentare mit [office-js], [word-addins] und [API] markiert sind. Diese Markierunge werden von uns überprüft.
91 |
92 | ## Weitere Informationen
93 |
94 | Hier noch einige weitere Ressourcen zum Erstellen von Add-Ins auf Basis von Word-JavaScript-APIs:
95 |
96 | * [Word-Add-Ins – Dokumentation und Beispiele](https://dev.office.com/word)
97 | * [Beispiel für SillyStories](https://github.com/OfficeDev/Word-Add-in-SillyStories) – Informationen zum Laden von DOCX-Dateien aus einem Dienst und Einfügen der Dateien in ein geöffnetes Word-Dokument
98 | * [Serverauthentifizierungsbeispiel für Office-Add-In für Node.js](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) Informationen zum Verwenden von Azure- und Google OAuth-Anbieter zum Authentifizieren von Add-In-Benutzern
99 |
100 | ## Copyright
101 | Copyright (c) 2016 Microsoft. Alle Rechte vorbehalten.
102 |
--------------------------------------------------------------------------------
/README-Localized/README-es-es.md:
--------------------------------------------------------------------------------
1 | # Ejemplo del complemento de Word de globos de imagen: cargar, editar e insertar imágenes
2 |
3 | **Tabla de contenido**
4 |
5 | * [Resumen](#summary)
6 | * [Herramientas necesarias](#required-tools)
7 | * [Cómo instalar certificados](#how-to-install-certificates)
8 | * [Cómo configurar y ejecutar la aplicación](#how-to-set-up-and-run-the-app)
9 | * [Cómo ejecutar el complemento en Word 2016 para Windows](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [Preguntas más frecuentes](#faq)
11 | * [Preguntas y comentarios](#questions-and-comments)
12 | * [Obtener más información](#learn-more)
13 |
14 |
15 | ## Resumen
16 |
17 | Este ejemplo de complemento de Word muestra cómo:
18 |
19 | 1. Crear un complemento de Word con TypeScript.
20 | 2. Cargar imágenes del documento en el complemento.
21 | 3. Editar imágenes en el complemento mediante la API de lienzo HTML e insertar las imágenes en un documento de Word.
22 | 4. Implementar comandos de complemento que inicien un complemento de la cinta de opciones y ejecuten un script tanto desde la cinta de opciones como desde un menú contextual.
23 | 5. Usar Office UI Fabric para crear una experiencia nativa similar a Word para el complemento.
24 |
25 | 
26 |
27 | Definición de **comando de complemento**: una extensión a la interfaz de usuario de Word que le permite iniciar el complemento en un panel de tareas o ejecutar un script desde la cinta de opciones o desde un menú contextual.
28 |
29 | Si quiere ver esto en acción, vaya a [Configuración de Word 2016 para Windows](#word-2016-for-windows-set-up) y use este [manifiesto](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml).
30 |
31 | ## Herramientas necesarias
32 |
33 | Para usar el ejemplo del complemento de globos de imagen de Word, se requiere lo siguiente.
34 |
35 | * Word 2016 16.0.6326.0000, una versión posterior o cualquier cliente compatible con la API de JavaScript de Word. En este ejemplo se realiza una comprobación de requisito para ver si se está ejecutando en un host compatible para las API de JavaScript.
36 | * npm (https://www.npmjs.com/) para instalar las dependencias. Viene con [NodeJS](https://nodejs.org/en/).
37 | * (Windows) [Git Bash](http://www.git-scm.com/downloads).
38 | * Clonar este repositorio en el equipo local.
39 |
40 | > Nota: Word para Mac 2016 no admite comandos de complemento en este momento. Puede ejecutar este ejemplo en Mac sin los comandos de complemento.
41 |
42 | ## Cómo instalar certificados
43 |
44 | Necesitará un certificado para ejecutar este ejemplo, ya que los comandos de complemento requieren HTTPS y, como los comandos de complementos no tienen interfaz de usuario, no puede aceptar certificados no válidos. Ejecute [./gen-cert.sh](#gen-cert.sh) para crear el certificado y, después, tendrá que instalar ca.crt en el almacén de entidades de certificación raíz de confianza (Windows).
45 |
46 | ## Cómo configurar y ejecutar la aplicación
47 |
48 | 1. Instale el Administrador de definición de TypeScript al escribir ```npm install typings -g``` en la línea de comandos.
49 | 2. Instale las definiciones de TypeScript identificadas en typings.json al ejecutar ```typings install``` en el directorio raíz del proyecto en la línea de comandos.
50 | 3. Instale las dependencias del proyecto identificadas en package.json al ejecutar ```npm install``` en el directorio raíz del proyecto.
51 | 4. Instale Gulp ```npm install -g gulp```.
52 | 5. Copie los archivos de Fabric y JQuery al ejecutar ```gulp copy:libs```. (Windows) Si tiene un problema aquí, asegúrese de que *%APPDATA%\npm* está en la variable de ruta de acceso.
53 | 6. Ejecute la tarea de Gulp predeterminada al ejecutar ```gulp``` desde el directorio raíz del proyecto. Si no se actualizan las definiciones de TypeScript, obtendrá un error aquí.
54 |
55 | En este punto, ha implementado este complemento de ejemplo. Ahora debe indicarle a Word dónde encontrar el complemento.
56 |
57 | ### Configuración de Word 2016 para Windows
58 |
59 | 1. (Solo Windows) Descomprima y ejecute esta [clave del Registro](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark) para activar la característica de comandos del complemento. Esto es necesario mientras los comandos de complementos son una **característica en vista previa**.
60 | 2. Cree un recurso compartido de red o [comparta una carpeta en la red](https://technet.microsoft.com/en-us/library/cc770880.aspx) y coloque el archivo de manifiesto [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml) en él.
61 | 3. Inicie Word y abra un documento.
62 | 4. Seleccione la pestaña **Archivo** y haga clic en **Opciones**.
63 | 5. Haga clic en **Centro de confianza** y seleccione el botón **Configuración del Centro de confianza**.
64 | 6. Elija **Catálogos de complementos de confianza**.
65 | 7. En el cuadro **Dirección URL del catálogo**, escriba la ruta de red al recurso compartido de carpeta que contiene manifest-word-add-in-canvas.xml y después elija **Agregar catálogo**.
66 | 8. Active la casilla **Mostrar en el menú** y elija **Aceptar**.
67 | 9. Aparecerá un mensaje para informarle de que la configuración se aplicará la próxima vez que inicie Office. Cierre y vuelva a iniciar Word.
68 |
69 | ## Cómo ejecutar el complemento en Word 2016 para Windows
70 |
71 | 1. Abra un documento de Word.
72 | 2. En la pestaña **Insertar** de Word 2016, elija **Mis complementos**.
73 | 3. Seleccione la pestaña **Carpeta compartida**.
74 | 4. Elija **Image callout add-in** (Complemento Globos de imagen) y, después, seleccione **Insertar**.
75 | 5. Si su versión de Word admite los comandos de complemento, la interfaz de usuario le informará de que se ha cargado el complemento. Puede usar la pestaña **Callout add-in** (Complemento de globo) para cargar el complemento en la interfaz de usuario y para insertar una imagen en el documento. También puede usar el menú contextual del botón derecho para insertar una imagen en el documento.
76 | 6. Si los comandos del complemento no son compatibles con su versión de Word, el complemento se cargará en un panel de tareas. Debe insertar una imagen en el documento de Word para usar la funcionalidad del complemento.
77 | 7. Seleccione una imagen en el documento de Word y cárguela en el panel de tareas al seleccionar *Load image from doc* (Cargar imagen del documento). Ahora puede insertar globos en la imagen. Seleccione *Insert image into doc* (Insertar imagen en el documento) para colocar la imagen actualizada en el documento de Word. El complemento generará descripciones de marcador de posición para cada uno de los globos.
78 |
79 | ## Preguntas más frecuentes
80 |
81 | * ¿Funcionarán los comandos de complemento en Mac y iPad? No, no funcionarán en Mac o iPad a partir de la publicación de este archivo Léame.
82 | * ¿Por qué no aparece mi complemento en la ventana **Mis complementos**? El manifiesto del complemento puede tener un error. Le sugiero que valide el manifiesto en el [esquema del manifiesto](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD).
83 | * ¿Por qué no se llama al archivo de función para los comandos de mis complementos? Los comandos de complemento requieren HTTPS. Ya que los comandos de complemento requieren TLS y no hay una interfaz de usuario, no puede ver si hay un problema de certificado. Si tiene que aceptar un certificado no válido en el panel de tareas, el comando de complemento no funcionará.
84 | * ¿Por qué no responden los comandos de instalación npm? Probablemente sí que respondan. Tarda un poco en Windows.
85 |
86 | ## Preguntas y comentarios
87 |
88 | Nos encantaría recibir sus comentarios sobre el ejemplo del complemento de Word Globos de imagen. Puede enviarnos sus preguntas y sugerencias a través de la sección [Problemas](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues) de este repositorio.
89 |
90 | Las preguntas generales sobre desarrollo de complementos deben publicarse en [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Asegúrese de que sus preguntas o comentarios se etiquetan con [office-js], [word-addins] y [API]. Vemos esas etiquetas.
91 |
92 | ## Obtener más información
93 |
94 | Aquí encontrará más recursos para que le resulte más fácil crear complementos basados en la API de JavaScript para Word:
95 |
96 | * [Documentación y ejemplos de complementos de Word](https://dev.office.com/word)
97 | * [Ejemplo de SillyStories](https://github.com/OfficeDev/Word-Add-in-SillyStories): obtenga información sobre cómo cargar archivos docx desde un servicio e insertarlos en un documento de Word abierto.
98 | * [Ejemplo de autenticación de servidor del complemento de Office](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth): obtenga información sobre cómo usar proveedores de Azure y Google OAuth para autenticar a usuarios de complemento.
99 |
100 | ## Copyright
101 | Copyright (c) 2016 Microsoft. Todos los derechos reservados.
102 |
--------------------------------------------------------------------------------
/README-Localized/README-fr-fr.md:
--------------------------------------------------------------------------------
1 | # Exemple de complément Word pour les légendes d’images : chargement, modification et insertion d’images
2 |
3 | **Table des matières**
4 |
5 | * [Résumé](#summary)
6 | * [Outils requis](#required-tools)
7 | * [Installation de certificats](#how-to-install-certificates)
8 | * [Configuration et exécution de l’application](#how-to-set-up-and-run-the-app)
9 | * [Exécution du complément dans Word 2016 pour Windows](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [FAQ](#faq)
11 | * [Questions et commentaires](#questions-and-comments)
12 | * [En savoir plus](#learn-more)
13 |
14 |
15 | ## Résumé
16 |
17 | Cet exemple de complément Word vous explique comment procéder pour :
18 |
19 | 1. Créer un complément Word avec TypeScript.
20 | 2. Charger des images à partir du document vers le complément.
21 | 3. Modifier des images dans le complément à l’aide de l’API de canevas HTML et insérer des images dans un document Word.
22 | 4. Mettre en œuvre des commandes de complément qui lancent un complément à partir du ruban et exécutent un script à partir du ruban et d’un menu contextuel.
23 | 5. Utilisez la structure de l’interface utilisateur Office pour créer une expérience native semblable à Word pour votre complément.
24 |
25 | 
26 |
27 | Définition - **Commande de complément** : extension de l’interface utilisateur Word qui vous permet de lancer le complément dans un volet Office ou d’exécuter un script à partir du ruban ou d’un menu contextuel.
28 |
29 | Si vous souhaitez simplement voir cette opération, passez à la section [Configuration de Word 2016 pour Windows](#word-2016-for-windows-set-up) et utilisez ce [manifeste](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml).
30 |
31 | ## Outils requis
32 |
33 | Pour utiliser l’exemple de complément Word pour les légendes d’image, les éléments suivants sont requis.
34 |
35 | * Word 2016 16.0.6326.0000 ou version ultérieure, ou tout autre client qui prend en charge l’API JavaScript de Word. Cet exemple effectue une vérification des conditions requises pour voir s’il est exécuté sur un hôte pris en charge par les API JavaScript.
36 | * npm (https://www.npmjs.com/) pour installer les dépendances. Cet élément est fourni avec [NodeJS](https://nodejs.org/en/).
37 | * (Windows) [Git Bash](http://www.git-scm.com/downloads).
38 | * Clonez ce référentiel sur votre ordinateur local.
39 |
40 | > Remarque : Word pour Mac 2016 ne prend pas en charge les commandes de complément à ce stade. Cet exemple peut s’exécuter sur Mac sans les commandes de complément.
41 |
42 | ## Installation de certificats
43 |
44 | Vous aurez besoin d’un certificat pour exécuter cet exemple, car les commandes de complément exigent HTTPS. Étant donné que celles-ci ne disposent pas d’interface utilisateur, vous ne pouvez pas accepter les certificats non valides. Exécutez [./gen-cert.sh](#gen-cert.sh) pour créer le certificat, puis installez ca.crt dans votre magasin d’autorités de certification racines de confiance (Windows).
45 |
46 | ## Comment configurer et exécuter l’application
47 |
48 | 1. Installez le Gestionnaire des définitions TypeScript en tapant ```npm install typings -g``` dans la ligne de commande.
49 | 2. Installez le Gestionnaire des définitions TypeScript en saisissant ```typings install``` au niveau de la ligne de commande.
50 | 3. Installez les définitions TypeScript identifiées dans typings.json en exécutant ```npm install``` dans le répertoire racine du projet au niveau de la ligne de commande.
51 | 4. Installez les dépendances du projet identifiées dans package.json en exécutant ```npm install -g gulp``` dans le répertoire racine du projet.
52 | 5. Copiez les fichiers Fabric et JQuery en exécutant ```gulp copy:libs```. (Windows) Si vous rencontrez un problème ici, vérifiez que *%APPDATA%\npm* se trouve dans votre variable de chemin d’accès.
53 | 6. Exécutez la tâche Gulp par défaut en exécutant ```gulp``` à partir du répertoire racine du projet. Si les définitions TypeScript ne sont pas mises à jour, vous recevrez une erreur ici.
54 |
55 | À ce stade, vous avez déployé cet exemple de complément. Vous devez maintenant indiquer à Word où trouver le complément.
56 |
57 | ### Configuration de Word 2016 pour Windows
58 |
59 | 1. (Windows uniquement) Décompressez et exécutez cette [clé de Registre](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark) pour activer la fonctionnalité de commandes de complément. Ce paramètre est obligatoire lorsque les commandes de complément sont une **fonctionnalité d’aperçu**.
60 | 2. Créez un partage réseau ou [partagez un dossier sur le réseau](https://technet.microsoft.com/en-us/library/cc770880.aspx), puis placez-y le fichier manifeste [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml).
61 | 3. Lancez Word et ouvrez un document.
62 | 4. Choisissez l’onglet **Fichier**, puis choisissez **Options**.
63 | 5. Choisissez l’onglet **Fichier**, puis choisissez **Options**.
64 | 6. Choisissez **Catalogues de compléments approuvés**.
65 | 7. Dans la zone **URL du catalogue**, entrez le chemin réseau pour accéder au partage de dossier qui contient le fichier manifest-word-add-in-canvas.xml, puis choisissez **Ajouter un catalogue**.
66 | 8. Activez la case à cocher **Afficher dans le menu**, puis cliquez sur **OK**.
67 | 9. Un message vous informe que vos paramètres seront appliqués lors du prochain démarrage d’Office. Fermez et redémarrez Word.
68 |
69 | ## Comment exécuter le complément dans Word 2016 pour Windows
70 |
71 | 1. Ouvrez un document Word.
72 | 2. Dans l’onglet **Insertion** de Word 2016, choisissez **Mes compléments**.
73 | 3. Sélectionnez l’onglet **Dossier partagé**.
74 | 4. Choisissez **Complément pour les légendes d’image**, puis sélectionnez **Insérer**.
75 | 5. Si les commandes de complément sont prises en charge par votre version de Word, l’interface utilisateur vous informe que le complément a été chargé. Vous pouvez utiliser l’onglet **Complément pour les légendes d’image** pour charger le complément dans l’interface utilisateur et insérer une image dans le document. Vous pouvez également utiliser le menu contextuel pour insérer une image dans le document.
76 | 6. Vous pouvez également utiliser le menu contextuel pour insérer une image dans le document.
77 | 7. Sélectionnez une image dans le document Word et chargez-la dans le volet Office en sélectionnant *Charger l’image à partir du document*. Vous pouvez désormais insérer des légendes dans l’image. Sélectionnez *Insérer une image dans le document* pour placer l’image mise à jour dans le document Word. Le complément génère des descriptions d’espace réservé pour chaque légende.
78 |
79 | ## FAQ
80 |
81 | * FAQ
82 | * Pourquoi mon complément n’apparaît-il pas dans la fenêtre **Mes compléments** ? Votre manifeste de complément peut comporter une erreur. Je vous conseille de valider le manifeste par rapport au [schéma de manifeste](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD).
83 | * Pourquoi le fichier de fonction n’est-il pas appelé pour mes commandes de complément ? Les commandes de complément nécessitent HTTPS. Étant donné que les commandes de complément requièrent TLS et qu’elles ne comportent aucune interface utilisateur, vous ne pouvez pas voir s’il existe un problème de certificat. Si vous devez accepter un certificat non valide dans le volet Office, la commande de complément ne peut pas fonctionner.
84 | * Si vous devez accepter un certificat non valide dans le volet Office, la commande de complément ne peut pas fonctionner.
85 |
86 | ## Questions et commentaires
87 |
88 | Nous serions ravis de connaître votre opinion sur l’exemple de complément pour les légendes d’image. Vous pouvez nous faire part de vos questions et suggestions dans la rubrique [Problèmes](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues) de ce référentiel.
89 |
90 | Vous pouvez nous faire part de vos questions et suggestions dans la rubrique [Problèmes](http://stackoverflow.com/questions/tagged/Office365+API) de ce référentiel.
91 |
92 | ## En savoir plus
93 |
94 | Voici des ressources supplémentaires pour vous aider à créer des compléments basés sur l’API JavaScript de Word :
95 |
96 | * [Exemples et documentation relatives aux compléments Word](https://dev.office.com/word)
97 | * [Exemples SillyStories :](https://github.com/OfficeDev/Word-Add-in-SillyStories) Découvrez comment charger des fichiers .docx à partir d’un service et comment insérer ces fichiers dans un document Word ouvert.
98 | * [Exemple d’authentification du complément Office sur le serveur pour Node.js](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) - Découvrez comment utiliser les fournisseurs Azure et Google OAuth pour l’authentification des utilisateurs de compléments.
99 |
100 | ## Copyright
101 | Copyright (c) 2016 Microsoft. Tous droits réservés.
102 |
--------------------------------------------------------------------------------
/README-Localized/README-ja-jp.md:
--------------------------------------------------------------------------------
1 | # イメージ吹き出し Word アドイン サンプル: イメージの読み込み、編集、挿入
2 |
3 | **目次**
4 |
5 | * [概要](#summary)
6 | * [必要なツール](#required-tools)
7 | * [証明書のインストール方法](#how-to-install-certificates)
8 | * [アプリの設定および実行方法](#how-to-set-up-and-run-the-app)
9 | * [Word 2016 for Windows でのアドインの実行方法](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [FAQ](#faq)
11 | * [質問とコメント](#questions-and-comments)
12 | * [詳細を見る](#learn-more)
13 |
14 |
15 | ## 概要
16 |
17 | この Word アドイン サンプルには、以下を実行する方法が示されています。
18 |
19 | 1. Typescript を使用して Word アドインを作成します。
20 | 2. ドキュメントからアドインにイメージを読み込みます。
21 | 3. HTML キャンバス API を使用してアドイン内のイメージを編集し、Word 文書にそのイメージを挿入します。
22 | 4. リボンからアドインを起動するアドイン コマンドと、リボンとコンテキスト メニューの両方からスクリプトを実行するアドイン コマンドを実装します。
23 | 5. Office UI ファブリックを使用して、アドインに対してネイティブの Word のようなエクスペリエンスを作成します。
24 |
25 | 
26 |
27 | 定義 - **アドイン コマンド**: Word UI への拡張機能。これにより、アドインを作業ウィンドウで起動するか、またはスクリプトをリボンかコンテキスト メニューのいずれかから実行することができます。
28 |
29 | この拡張機能の動作の確認だけをしたい場合は、「[Word 2016 for Windows の設定](#word-2016-for-windows-set-up)」にスキップしてこの[マニフェスト](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml)を使用してください。
30 |
31 | ## 必要なツール
32 |
33 | イメージ吹き出し Word アドイン サンプルを使用するには、以下が必要になります。
34 |
35 | * Word 2016 16.0.6326.0000 以降、または Word Javascript API をサポートする任意のクライアント。このサンプルでは、JavaScript API をサポートするホストで実行されているか確認する要件チェックが実行されます。
36 | * npm (https://www.npmjs.com/)。依存関係をインストールします。[NodeJS](https://nodejs.org/en/) に付属しています。
37 | * (Windows の場合) [Git Bash](http://www.git-scm.com/downloads)。
38 | * ローカル コンピューターにこのリポジトリのクローンを作成します。
39 |
40 | > 注: Word for Mac 2016 は、現時点でアドイン コマンドをサポートしていません。このサンプルは、アドイン コマンドを使用せずに Mac で実行できます。
41 |
42 | ## 証明書のインストール方法
43 |
44 | アドイン コマンドは HTTPS を必要とするため、このサンプルを実行するには証明書が必要になります。また、アドイン コマンドには UI がないため、無効な証明書を受け付けることができません。[./gen-cert.sh](#gen-cert.sh) を実行して証明書を作成した後、信頼されたルート証明機関ストアに ca.crt をインストールする必要があります (Windows の場合)。
45 |
46 | ## アプリの設定および実行方法
47 |
48 | 1. コマンド ラインに ```npm install typings -g``` と入力して、TypeScript 定義マネージャーをインストールします。
49 | 2. コマンド ラインを使用してプロジェクトのルート ディレクトリで ```typings install``` を実行し、typings.json で識別される Typescript 定義をインストールします。
50 | 3. プロジェクトのルート ディレクトリで ```npm install``` を実行し、package.json で識別されるプロジェクトが依存関係をインストールします。
51 | 4. gulp ```npm install -g gulp``` をインストールします。
52 | 5. ```gulp copy:libs``` を実行して、ファブリックと JQuery ファイルをコピーします。(Windows の場合) ここで問題が発生する場合、*%APPDATA%\npm* が path 変数に設定されていることを確認します。
53 | 6. プロジェクトのルート ディレクトリから ```gulp``` を実行することによって、既定の gulp タスクを実行します。TypeScript 定義が更新されない場合は、ここでエラーが発生します。
54 |
55 | この時点で、このサンプル アドインが配置されたことになります。次に、Word がアドインを検索する場所を認識できるようにする必要があります。
56 |
57 | ### Word 2016 for Windows の設定
58 |
59 | 1. (Windows のみ) この[レジストリ キー](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark)を解凍し、実行することによって、アドイン コマンド機能を有効にします。これは、アドイン コマンドが**プレビュー機能**である間、必要です。
60 | 2. ネットワーク共有を作成するか、[ネットワークでフォルダーを共有し](https://technet.microsoft.com/en-us/library/cc770880.aspx)、そのフォルダーに [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml) マニフェスト ファイルを配置します。
61 | 3. Word を起動し、ドキュメントを開きます。
62 | 4. [**ファイル**] タブを選択し、[**オプション**] を選択します。
63 | 5. [**セキュリティ センター**] を選択し、[**セキュリティ センターの設定**] ボタンを選択します。
64 | 6. **[信頼されているアドイン カタログ]** を選択します。
65 | 7. **[カタログの URL]** ボックスに、manifest-word-add-in-canvas.xml があるフォルダー共有へのネットワーク パスを入力して、**[カタログの追加]** を選択します。
66 | 8. **[メニューに表示する]** チェック ボックスをオンにし、**[OK]** を選択します。
67 | 9. これらの設定が Office を次回起動したときに適用されることを示すメッセージが表示されます。Word を終了して、再起動します。
68 |
69 | ## Word 2016 for Windows でのアドインの実行方法
70 |
71 | 1. Word 文書を開きます。
72 | 2. Word 2016 の**[挿入]** タブで、**[マイ アドイン]** を選択します。
73 | 3. **[共有フォルダー]** タブを選択します。
74 | 4. **[イメージ吹き出しアドイン]** を選択し、**[挿入]** を選択します。
75 | 5. ご使用の Word バージョンでアドイン コマンドがサポートされている場合、UI によってアドインが読み込まれたことが通知されます。**[吹き出しアドイン]** タブを使用して、UI にアドインを読み込み、ドキュメントにイメージを挿入します。イメージをドキュメントに挿入する右クリックコンテキスト メニューを使用することもできます。
76 | 6. アドイン コマンドがご使用の Word バージョンによってサポートされていない場合は、アドインが作業ウィンドウに読み込まれます。アドインの機能を使用するために、Word 文書に画像を挿入することが必要になります。
77 | 7. Word 文書でイメージを選択し、*[doc からイメージを読み込む]* を選択して作業ウィンドウにそのイメージを読み込みます。これで、吹き出しをイメージに挿入することができるようになりました。*[イメージを doc に挿入する]* を選択して、更新されたイメージを Word 文書に配置します。アドインは、それぞれの吹き出しに対してプレースホルダーの説明を生成します。
78 |
79 | ## FAQ
80 |
81 | * アドイン コマンドは Mac や iPad で動作しますか。いいえ。このリリース ノートの公開時点では、アドイン コマンドは Mac または iPad では動作しません。
82 | * 個人用のアドインが **[個人用アドイン]** ウィンドウに表示されないのはなぜですか。アドイン マニフェストにエラーがある可能性があります。[マニフェスト スキーマ](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD)に対してマニフェストを検証することをお勧めします。
83 | * 個人用アドイン コマンドで、関数ファイルを呼び出せないのはなぜですか。アドイン コマンドでは、HTTPS が必要になります。アドイン コマンドでは TLS を必要とし、UI がないため、証明書に問題があるかどうか確認できません。作業ウィンドウで無効な証明書を受け入れる必要がある場合、アドイン コマンドは機能しません。
84 | * npm インストール コマンドがハングアップしてしまうのはなぜですか。ハングアップしていない可能性があります。Windows 上での処理に時間がかかります。
85 |
86 | ## 質問とコメント
87 |
88 | イメージ吹き出し Word アドイン サンプルについて、Microsoft にフィードバックをお寄せください。質問や提案につきましては、このリポジトリの「[問題](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues)」セクションに送信できます。
89 |
90 | アドイン開発全般の質問については、「[スタック オーバーフロー](http://stackoverflow.com/questions/tagged/Office365+API)」に投稿してください。質問またはコメントには、[office-js]、[word-addins]、[API] のタグを付けてください。これらのタグに注目しています。
91 |
92 | ## 詳細を見る
93 |
94 | Word Javascript API ベースのアドインを作成するのに役立つその他のリソースを以下に示します。
95 |
96 | * [Word アドインの文書およびサンプル](https://dev.office.com/word)
97 | * [SillyStories サンプル](https://github.com/OfficeDev/Word-Add-in-SillyStories) - サービスから docx ファイルを読み込んで、開いている Word 文書にファイルを挿入する方法について説明します。
98 | * [Node.js 用の Office アドイン サーバー認証サンプル](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) - アドイン ユーザーを認証するために Azure および Google OAuth プロバイダーを使用する方法について説明します。
99 |
100 | ## 著作権
101 | Copyright (c) 2016 Microsoft. All rights reserved.
102 |
--------------------------------------------------------------------------------
/README-Localized/README-pt-br.md:
--------------------------------------------------------------------------------
1 | # Exemplo de suplemento do Word da imagem: carregar, editar e inserir imagens
2 |
3 | **Sumário**
4 |
5 | * [Resumo](#summary)
6 | * [Ferramentas necessárias](#required-tools)
7 | * [Como instalar certificados](#how-to-install-certificates)
8 | * [Como configurar e executar o aplicativo](#how-to-set-up-and-run-the-app)
9 | * [Como executar o suplemento no Word 2016 para Windows](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [Perguntas frequentes](#faq)
11 | * [Perguntas e comentários](#questions-and-comments)
12 | * [Saiba mais](#learn-more)
13 |
14 |
15 | ## Resumo
16 |
17 | Este exemplo de suplemento do Word mostra como:
18 |
19 | 1. Criar um suplemento do Word com Typescript.
20 | 2. Carregar imagens do documento para o suplemento.
21 | 3. Editar imagens no suplemento, usando a API de tela em HTML e inserir as imagens em um documento do Word.
22 | 4. Implementar comandos de suplemento que iniciam um suplemento na faixa de opções e executam um script a partir da faixa de opções e de um menu de contexto.
23 | 5. Use o Office UI Fabric para criar uma experiência nativa parecida com o Word para o suplemento.
24 |
25 | 
26 |
27 | Definição - **comando de suplemento**: uma extensão para a interface do usuário do Word que permite iniciar o suplemento no painel de tarefas ou executar um script a partir da faixa de opções ou de um menu de contexto.
28 |
29 | Se você quiser ver isso em ação, passe diretamente para [configuração do Word 2016 para Windows](#word-2016-for-windows-set-up) e use esse [manifesto](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml).
30 |
31 | ## Ferramentas necessárias
32 |
33 | Para usar o exemplo de suplemento do Word Textos explicativos da imagem, são necessários.
34 |
35 | * Word 2016 16.0.6326.0000, ou superior, ou qualquer cliente que seja compatível com a API Javascript do Word. Este exemplo faz uma verificação de requisitos para ver se ele está sendo executado em um host compatível com as APIs JavaScript.
36 | * npm (https://www.npmjs.com/) para instalar as dependências. O suplemento vem com [NodeJS](https://nodejs.org/en/).
37 | * (Windows) [Git Bash](http://www.git-scm.com/downloads).
38 | * Clone este repositório em seu computador local.
39 |
40 | > Observação: O Word para Mac 2016 não é compatível com comandos de suplemento neste momento. Esse exemplo pode ser executado no Mac sem os comandos de suplemento.
41 |
42 | ## Como instalar certificados
43 |
44 | Será necessário um certificado para executar esse exemplo já que os comandos de suplemento exigem HTTPS e, como eles não têm uma interface do usuário, você não pode aceitar certificados inválidos. Execute [./gen-cert.sh](#gen-cert.sh) para criar o certificado e, em seguida, será necessário instalar ca.crt em sua loja de Autoridades de Certificação Raiz Confiáveis (Windows).
45 |
46 | ## Como configurar e executar o aplicativo
47 |
48 | 1. Instale o Gerenciador de definição do TypeScript digitando ```npm install typings -g``` na linha de comando.
49 | 2. Instale as definições do Typescript identificadas em typings.json executando ```typings install``` no diretório raiz do projeto na linha de comando.
50 | 3. Instale as dependências do projeto identificadas em package.json executando ```npm install``` no diretório raiz do projeto.
51 | 4. Instale o ```npm install -g gulp``` do Gulp.
52 | 5. Copie os arquivos do Fabric e do JQuery executando o ```gulp copy:libs```. (Windows) Se você tiver um problema aqui, verifique se *%APPDATA%\npm* está em sua variável path.
53 | 6. Execute a tarefa padrão do Gulp executando ```gulp``` a partir do diretório raiz do projeto. Se as definições do TypeScript não estiverem atualizadas, você receberá um erro aqui.
54 |
55 | Nesse momento, esse suplemento do exemplo foi implementado. Agora, você precisa informar ao Word onde encontrar o suplemento.
56 |
57 | ### Configuração do Word 2016 para Windows
58 |
59 | 1. (Windows) Descompacte e execute essa [chave de registro](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark) para ativar o recurso de comandos de suplemento. Isso é necessário porque os comandos de suplemento são um **recurso de visualização**.
60 | 2. Crie um compartilhamento de rede ou [compartilhe uma pasta para a rede](https://technet.microsoft.com/en-us/library/cc770880.aspx) e coloque o arquivo de manifesto [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml) nele.
61 | 3. Inicie o Word e abra um documento.
62 | 4. Escolha a guia **Arquivo** e escolha **Opções**.
63 | 5. Escolha **Central de Confiabilidade**, e escolha o botão **Configurações da Central de Confiabilidade**.
64 | 6. Escolha **Catálogos de Suplementos Confiáveis**.
65 | 7. Na caixa **URL do Catálogo**, digite o caminho de rede para o compartilhamento de pasta que contém manifest-word-add-in-canvas.xml e escolha **Adicionar Catálogo**.
66 | 8. Selecione a caixa de seleção **Mostrar no Menu** e, em seguida, escolha **OK**.
67 | 9. Será exibida uma mensagem para informá-lo de que suas configurações serão aplicadas na próxima vez que você iniciar o Office. Feche e reinicie o Word.
68 |
69 | ## Como executar o suplemento no Word 2016 para Windows
70 |
71 | 1. Abra um documento do Word.
72 | 2. Na guia **Inserir** no Word 2016, escolha **Meus Suplementos**.
73 | 3. Selecione a guia **Pasta compartilhada**.
74 | 4. Escolha o **suplemento Texto explicativo da imagem** e **Inserir**.
75 | 5. Se os comandos de suplemento forem compatíveis com sua versão do Word, a interface do usuário informará que o suplemento foi carregado. Você pode usar a guia do **suplemento Texto explicativo** para carregar o suplemento na interface do usuário e para inserir uma imagem no documento. Você também pode usar o menu de contexto do botão direito do mouse para inserir uma imagem no documento.
76 | 6. O suplemento será carregado no painel de tarefas se os comandos de suplemento não forem compatíveis com sua versão do Word. Você precisará inserir uma imagem no documento do Word para usar a funcionalidade do suplemento.
77 | 7. Selecione uma imagem no documento do Word e carregue-a no painel de tarefas escolhendo *Carregar imagem a partir do doc*. Agora você pode inserir os textos explicativos na imagem. Escolha *Inserir imagem no documento* para posicionar a imagem atualizada no documento do Word. O suplemento gerará descrições de espaço reservado para cada um dos textos explicativos.
78 |
79 | ## Perguntas frequentes
80 |
81 | * Os comandos de suplemento funcionarão no Mac e no iPad? Não, eles não funcionarão no Mac ou no iPad desde a publicação deste arquivo Leiame.
82 | * Por que meu suplemento não é exibido na janela **Meus Suplementos**? Pode haver um erro no manifesto de seu suplemento. Sugerimos que você valide o manifesto no [esquema do manifesto](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD).
83 | * Por que o arquivo de função não é chamado para meus comandos de suplemento? Os comandos de suplemento exigem HTTPS. Como os comandos de suplemento exigem TLS e não existe uma interface do usuário, não é possível ver se há um problema de certificado. Se você tiver que aceitar um certificado inválido no painel de tarefas, o comando de suplemento não funcionará.
84 | * Por que os comandos de instalação do npm travam? Eles provavelmente não estão travados. Eles demoram um pouco para iniciar no Windows.
85 |
86 | ## Perguntas e comentários
87 |
88 | Gostaríamos de saber sua opinião sobre o exemplo de suplemento do Word Texto explicativo da imagem. Você pode enviar perguntas e sugestões na seção [Problemas](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues) deste repositório.
89 |
90 | As perguntas sobre o desenvolvimento de suplementos em geral devem ser postadas no [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Não deixe de marcar as perguntas ou comentários com [office-js], [word-addins] e [API]. Estamos observando essas marcas.
91 |
92 | ## Learn more
93 |
94 | Veja mais recursos para ajudá-lo a criar suplementos baseados na API Javascript do Word:
95 |
96 | * [Exemplos e documentação de suplementos do Word](https://dev.office.com/word)
97 | * [Exemplo de histórias engraçadas](https://github.com/OfficeDev/Word-Add-in-SillyStories) – Saiba como carregar arquivos docx a partir de um serviço e inserir os arquivos em um documento aberto do Word.
98 | * [Exemplo de Autenticação de Servidor de Suplemento do Office para Node.js](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) - saiba como usar os provedores OAuth do Azure e do Google para autenticar usuários de suplementos.
99 |
100 | ## Direitos autorais
101 | Copyright © 2016 Microsoft. Todos os direitos reservados.
102 |
--------------------------------------------------------------------------------
/README-Localized/README-ru-ru.md:
--------------------------------------------------------------------------------
1 | # Пример надстройки Word для использования изображений с выносками: загрузка, редактирование и вставка изображений
2 |
3 | **Содержание**
4 |
5 | * [Сводка](#summary)
6 | * [Необходимые средства](#required-tools)
7 | * [Как устанавливать сертификаты](#how-to-install-certificates)
8 | * [Как установить и запустить приложение](#how-to-set-up-and-run-the-app)
9 | * [Как запустить надстройку в Word 2016 для Windows](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [Вопросы и ответы](#faq)
11 | * [Вопросы и комментарии](#questions-and-comments)
12 | * [Подробнее](#learn-more)
13 |
14 |
15 | ## Сводка
16 |
17 | В этом примере надстройки Word показано, как:
18 |
19 | 1. создать надстройку Word с помощью Typescript;
20 | 2. загружать изображения из документа в надстройку;
21 | 3. редактировать изображения в надстройке с помощью API холста HTML и вставлять изображения в документ Word;
22 | 4. реализовать команды надстройки, которые как запускают надстройку с ленты, так и выполняют скрипт с ленты и из контекстного меню;
23 | 5. оформить надстройку в стиле Word с помощью Office UI Fabric.
24 |
25 | 
26 |
27 | Определение. **Команда надстройки** — это расширение пользовательского интерфейса Word, позволяющее запустить надстройку в области задач либо выполнить скрипт, выбрав его на ленте или в контекстном меню.
28 |
29 | Если вы просто хотите увидеть ее в действии, перейдите к разделу [Установка Word 2016 для Windows](#word-2016-for-windows-set-up) и используйте этот [манифест](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml).
30 |
31 | ## Необходимые средства
32 |
33 | Чтобы использовать пример надстройки Word с выносками изображений, необходимо следующее:
34 |
35 | * Word 2016 16.0.6326.0000 или более поздней версии либо другой клиент, поддерживающий API JavaScript для Word. В этом примере выполняется проверка требований, чтобы определить, запущена ли надстройка в ведущем приложении, поддерживающем API-интерфейсы JavaScript.
36 | * npm (https://www.npmjs.com/) для установки зависимостей. Он поставляется вместе с [NodeJS](https://nodejs.org/en/).
37 | * [Git Bash](http://www.git-scm.com/downloads) (Windows).
38 | * Клонируйте этот репозиторий на локальный компьютер.
39 |
40 | > Примечание. В настоящее время Word для Mac 2016 не поддерживает команды надстроек. Этот пример можно запустить на компьютере Mac без команд надстройки.
41 |
42 | ## Как устанавливать сертификаты
43 |
44 | Для работы этого примера потребуется сертификат, так как команды надстроек используют протокол HTTPS. У них нет интерфейса, поэтому принимать недействительные сертификаты невозможно. Запустите [./gen-cert.sh](#gen-cert.sh), чтобы создать сертификат. Затем вам потребуется установить файл ca.crt в хранилище доверенных корневых центров сертификации (Windows).
45 |
46 | ## Как установить и запустить приложение
47 |
48 | 1. Установите диспетчер определений TypeScript, введя команду ```npm install typings -g``` в командной строке.
49 | 2. Установите определения Typescript из файла typings.json, выполнив команду ```typings install``` в корневом каталоге проекта.
50 | 3. Установите зависимости проекта, определенные в файле package.json, выполнив команду ```npm install``` в корневом каталоге проекта.
51 | 4. Установите gulp: ```npm install -g gulp```.
52 | 5. Скопируйте файлы Fabric и JQuery с помощью команды ```gulp copy:libs```. Если с этим возникнут проблемы, убедитесь, что переменная пути содержит значение *%APPDATA%\npm* (для Windows).
53 | 6. Запустите задачу gulp по умолчанию, выполнив команду ```gulp``` в корневом каталоге проекта. Если определения TypeScript не обновлены, возникнет ошибка.
54 |
55 | Вы только что развернули пример надстройки. Теперь необходимо сообщить Word, где находится эта надстройка.
56 |
57 | ### Установка Word 2016 для Windows
58 |
59 | 1. Распакуйте и установите этот [ключ реестра](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark), чтобы активировать команды надстроек (только для Windows). Это обязательно, пока команды надстроек находятся в **предварительной версии**.
60 | 2. Создайте сетевую папку или [откройте доступ к папке в сети](https://technet.microsoft.com/en-us/library/cc770880.aspx) и поместите в нее файл манифеста [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml).
61 | 3. Запустите Word и откройте документ.
62 | 4. Перейдите на вкладку **Файл**, а затем выберите **Параметры**.
63 | 5. Выберите **Центр управления безопасностью**, а затем нажмите кнопку **Параметры центра управления безопасностью**.
64 | 6. Выберите пункт **Доверенные каталоги приложений**.
65 | 7. В поле **URL-адрес каталога** введите сетевой путь к общей папке, содержащей файл manifest-word-add-in-canvas.xml, а затем выберите элемент **Добавить каталог**.
66 | 8. Установите флажок **Показать в меню** и нажмите кнопку **ОК**.
67 | 9. Появится сообщение, информирующее о том, что параметры будут применены при следующем запуске Office. Закройте и перезапустите Word.
68 |
69 | ## Как запустить надстройку в Word 2016 для Windows
70 |
71 | 1. Откройте документ Word.
72 | 2. На вкладке **Вставка** в Word 2016 выберите **Мои приложения**.
73 | 3. Перейдите на вкладку **Общая папка**.
74 | 4. Выберите элемент **Надстройка с выносками изображений**, а затем нажмите кнопку **Вставить**.
75 | 5. Если ваша версия Word поддерживает команды надстроек, то в пользовательском интерфейсе отобразятся сведения о том, что надстройка загружена. С помощью вкладки **Надстройка с выносками** можно загрузить надстройку в пользовательском интерфейсе и вставить изображение в документ. Кроме того, вставить изображение в документ можно с помощью контекстного меню, вызываемого при нажатии правой кнопкой мыши.
76 | 6. Если ваша версия Word не поддерживает команды надстроек, то надстройка загрузится в области задач. Чтобы использовать функции надстройки, необходимо вставить изображение в документ Word.
77 | 7. Выберите изображение в документе Word и загрузите его в область задач, выбрав команду *Load image from doc* (Загрузить изображение из документа). Теперь в изображение можно вставлять выноски. Нажмите *Insert image into doc* (Вставить изображение в документ), чтобы поместить измененное изображение в документ Word. Надстройка создаст заполнитель описания для каждой выноски.
78 |
79 | ## Вопросы и ответы
80 |
81 | * Будут ли команды надстроек работать на компьютерах Mac и устройствах iPad? Нет, на момент публикации этого руководства они не работают на Mac и iPad.
82 | * Почему надстройка не отображается в окне **Мои надстройки**? Возможно, в манифесте надстройки допущена ошибка. Рекомендуем сравнить манифест со [схемой манифеста](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD).
83 | * Почему не вызывается файл функций для команд надстройки? Команды надстроек используют протокол HTTPS. Так как для команд надстроек необходим протокол TLS и у них нет пользовательского интерфейса, невозможно проверить наличие проблем с сертификатом. Если необходимо принять недействительный сертификат в области задач, команда надстройки не будет работать.
84 | * Почему команды установки npm зависают? Скорее всего, команда не зависла. Просто в Windows установка занимает много времени.
85 |
86 | ## Вопросы и комментарии
87 |
88 | Мы будем рады получить от вас отзывы о примере надстройки Word с выносками изображений. Вы можете задать нам вопросы и добавлять предложения в разделе [Issues](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues)(Проблемы) этого репозитория.
89 |
90 | Общие вопросы о разработке надстроек следует задавать на сайте [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Убедитесь, что ваши вопросы и комментарии помечены тегами [office-js], [word-addins] и [API]. Мы следим за этими тегами.
91 |
92 | ## Подробнее
93 |
94 | Ниже представлены дополнительные ресурсы, посвященные созданию надстроек на основе API JavaScript для Word.
95 |
96 | * [Документация и примеры надстроек для Word](https://dev.office.com/word)
97 | * [Пример SillyStories](https://github.com/OfficeDev/Word-Add-in-SillyStories). Узнайте, как загружать файлы DOCX из службы и вставлять их в открытый документ Word.
98 | * [Пример надстройки Office с проверкой подлинности на сервере для Node.js](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth). Узнайте, как использовать поставщиков Azure и Google OAuth для проверки подлинности пользователей.
99 |
100 | ## Авторское право
101 | (c) Корпорация Майкрософт (Microsoft Corporation), 2016. Все права защищены.
102 |
--------------------------------------------------------------------------------
/README-Localized/README-zh-cn.md:
--------------------------------------------------------------------------------
1 | # 图像标注 Word 外接程序示例:加载、编辑和插入图像
2 |
3 | **目录**
4 |
5 | * [摘要](#summary)
6 | * [必备工具](#required-tools)
7 | * [如何安装证书](#how-to-install-certificates)
8 | * [如何设置并运行应用](#how-to-set-up-and-run-the-app)
9 | * [如何在 Word 2016 for Windows 中运行外接程序](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [常见问题解答](#faq)
11 | * [问题和意见](#questions-and-comments)
12 | * [了解更多](#learn-more)
13 |
14 |
15 | ## 摘要
16 |
17 | 此 Word 外接程序示例演示如何:
18 |
19 | 1. 使用 Typescript 创建 Word 外接程序。
20 | 2. 将文档中的图像加载到外接程序中。
21 | 3. 通过使用 HTML 画布 API 编辑外接程序中的图像并将图像插入到 Word 文档中。
22 | 4. 实现外接程序命令,从功能区启动外接程序并从功能区和上下文菜单中运行脚本。
23 | 5. 使用 Office UI 结构为你的外接程序创建本机 Word 般的体验。
24 |
25 | 
26 |
27 | 定义 - **外接程序命令**:Word UI 的扩展,允许你在任务窗格中启动外接程序,或者从功能区或上下文菜单中运行脚本。
28 |
29 | 如果你只想看到实际操作,请跳到 [Word 2016 for Windows 设置](#word-2016-for-windows-set-up),并使用此[清单](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml)。
30 |
31 | ## 必需的工具
32 |
33 | 若要使用图像标注 Word 外接程序示例,必须符合以下条件。
34 |
35 | * Word 2016 16.0.6326.0000 或更高版本,或任何支持 Word Javascript API 的客户端。此示例会执行要求检查以查看是否正在受支持的 JavaScript API 主机中运行。
36 | * 可安装依赖项的 npm (https://www.npmjs.com/)。它附带了 [NodeJS](https://nodejs.org/en/)。
37 | * (Windows) [Git Bash](http://www.git-scm.com/downloads)。
38 | * 克隆此存储库到本地计算机。
39 |
40 | > 注意:目前,Word for Mac 2016 不支持外接程序命令。此示例无需外接程序命令即可在 Mac 上运行。
41 |
42 | ## 如何安装证书
43 |
44 | 你必须有证书才能运行此示例,因为外接程序命令需要 HTTPS,而且由于外接程序命令无 UI,你不能接受无效的证书。运行 [./gen-cert.sh](#gen-cert.sh) 创建证书,然后你需要将 ca.crt 安装到受信任的根证书颁发机构存储区中 (Windows)。
45 |
46 | ## 如何设置并运行应用
47 |
48 | 1. 通过在命令行处键入 ```npm install typings -g``` 来安装 TypeScript 定义管理器。
49 | 2. 通过在命令行处运行项目的根目录中的 ```typings install``` 来安装在 typings.json 中标识的 Typescript 定义。
50 | 3. 通过在项目的根目录中运行 ```npm install``` 来安装在 package.json 中标识的项目依赖项。
51 | 4. 安装 gulp ```npm install -g gulp```。
52 | 5. 通过运行 ```gulp copy:libs``` 复制结构和 JQuery 文件。(Windows) 如果你在此处遇到问题,请确保 *%APPDATA%\npm* 位于你的 path 变量中。
53 | 6. 通过从项目的根目录运行 ```gulp``` 来运行默认的 gulp 任务。如果没有更新 TypeScript 定义,你将在此处遇到错误。
54 |
55 | 此时,你已部署了第一个示例外接程序。现在,你需要让 Word 知道在哪里可以找到该外接程序。
56 |
57 | ### Word 2016 for Windows 设置
58 |
59 | 1. (仅限 Windows)解压缩并运行此[注册表项](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark)以激活外接程序命令功能。当外接程序命令是**预览功能**时必须执行此操作。
60 | 2. 创建网络共享,或[将文件夹共享到网络](https://technet.microsoft.com/en-us/library/cc770880.aspx),并将 [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml) 清单文件放入该文件夹中。
61 | 3. 启动 Word,然后打开一个文档。
62 | 4. 选择**文件**选项卡,然后选择**选项**。
63 | 5. 选择**信任中心**,然后选择**信任中心设置**按钮。
64 | 6. 选择“**受信任的外接程序目录**”。
65 | 7. 在“**目录 URL**”字段中,输入包含 manifest-word-add-in-canvas.xml 的文件夹共享的网络路径,然后选择“**添加目录**”。
66 | 8. 选择“**显示在菜单中**”复选框,然后选择“**确定**”。
67 | 9. 随后会出现一条消息,告知您下次启动 Office 时将应用您的设置。关闭并重新启动 Word。
68 |
69 | ## 如何在 Word 2016 for Windows 中运行外接程序
70 |
71 | 1. 打开一个 Word 文档。
72 | 2. 在 Word 2016 中的**插入**选项卡上,选择**我的外接程序**。
73 | 3. 选择**共享文件夹**选项卡。
74 | 4. 选择“**图像标注外接程序**”,然后选择“**插入**”。
75 | 5. 如果你的 Word 版本支持外接程序命令,UI 将通知你加载了外接程序。可以使用“**标注外接程序**”选项卡在 UI 中加载外接程序以及将图像插入文档中。还可以使用右键单击上下文菜单将图像插入到文档中。
76 | 6. 如果你的 Word 版本不支持外接程序命令,则外接程序将在任务窗格中加载。需要将图片插入到 Word 文档中才能使用外接程序的功能。
77 | 7. 在 Word 文档中选择一个图像,并通过选择“*从 doc 加载图像*”将其加载到任务窗格中。现在,你可以将标注插入到图像中。选择“*将图像插入到 doc 中*”将更新的图像放入 Word 文档中。外接程序将针对各个标注生成相应的占位符说明。
78 |
79 | ## 常见问题解答
80 |
81 | * 外接程序命令将在 Mac 和 iPad 上可用?不,截至此自述文件发布之前,这些命令都将无法在 Mac 或 iPad 上使用。
82 | * 为什么我的外接程序显示在“**我的外接程序**”窗口中?你的外接程序清单可能有错误。我建议你针对[清单架构](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD)验证清单。
83 | * 为什么我的外接程序命令不调用该函数文件?外接程序命令需要 HTTPS。由于外接程序命令需要 TLS,并且没有 UI,因此你无法看到是否存在证书问题。如果你必须在任务窗格中接受无效的证书,那么该外接程序命令不起作用。
84 | * 为什么 npm 安装命令挂起?很可能不是挂起,只是在 Windows 上需要一段时间。
85 |
86 | ## 问题和意见
87 |
88 | 我们乐意倾听你对图像标注 Word 外接程序示例的相关反馈。你可以在该存储库中的“[问题](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues)”部分将问题和建议发送给我们。
89 |
90 | 与外接程序开发相关的问题一般应发布到 [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API)。确保你的问题或意见使用了 [office-js]、[word-addins] 和 [API] 标记。我们会一直关注这些标记。
91 |
92 | ## 了解详细信息
93 |
94 | 以下是更多的资源,可帮助你创建基于 Word Javascript API 的外接程序:
95 |
96 | * [Word 外接程序文档和示例](https://dev.office.com/word)
97 | * [SillyStories 示例](https://github.com/OfficeDev/Word-Add-in-SillyStories) - 了解如何从服务中加载 docx 文件以及将文件插入到打开的 Word 文档中。
98 | * [Node.js 的 Office 外接程序服务器身份验证示例](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) - 了解如何使用 Azure 和 Google OAuth 提供程序对外接程序用户进行身份验证。
99 |
100 | ## 版权
101 | 版权所有 (c) 2016 Microsoft。保留所有权利。
102 |
--------------------------------------------------------------------------------
/README-Localized/README-zh-tw.md:
--------------------------------------------------------------------------------
1 | # 影像圖說文字 Word 增益集範例︰載入、編輯和插入影像
2 |
3 | **目錄**
4 |
5 | * [摘要](#summary)
6 | * [需要的工具](#required-tools)
7 | * [如何安裝憑證](#how-to-install-certificates)
8 | * [如何設定和執行應用程式](#how-to-set-up-and-run-the-app)
9 | * [如何在 Word 2016 for Windows 中執行增益集](#how-to-run-the-add-in-in-Word-2016-for-Windows)
10 | * [常見問題集](#faq)
11 | * [問題和建議](#questions-and-comments)
12 | * [深入了解](#learn-more)
13 |
14 |
15 | ## 摘要
16 |
17 | 此 Word 增益集範例將會為您示範如何:
18 |
19 | 1. 使用 Typescript,以建立 Word 增益集。
20 | 2. 從文件將影像載入增益集。
21 | 3. 在增益集中編輯影像,方法是使用 HTML 畫布 API 並且將影像插入 Word 文件。
22 | 4. 實作增益集命令,從功能區啟動增益集,以及從功能區與內容功能表執行指令碼。
23 | 5. 使用 Office UI Fabric,建立增益集的原生類似 Word 的經驗。
24 |
25 | 
26 |
27 | 定義 - **增益集命令**:Word UI 的擴充,可讓您在工作窗格中啟動增益集,或從功能區或內容功能表執行指令碼。
28 |
29 | 如果您只想要看到此動作,直接跳到 [Word 2016 for Windows 設定](#word-2016-for-windows-set-up),並使用這個[資訊清單](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml)。
30 |
31 | ## 需要的工具
32 |
33 | 若要使用影像圖說文字 Word 增益集範例,需要有下列各項。
34 |
35 | * Word 2016 16.0.6326.0000 或更高版本,或支援 Word Javascript API 的任何用戶端。這個範例會執行必要檢查,以查看它是否在 JavaScript API 支援的主機中執行。
36 | * npm (https://www.npmjs.com/) 以安裝相依性。它隨附 [NodeJS](https://nodejs.org/en/)。
37 | * (Windows) [Git Bash](http://www.git-scm.com/downloads)
38 | * 複製此儲存機制到本機電腦。
39 |
40 | > 附註:Word for Mac 2016 目前不支援增益集命令。這個範例可以在 Mac 上執行,不需要增益集命令。
41 |
42 | ## 如何安裝憑證
43 |
44 | 您需要憑證才能執行這個範例,因為增益集命令需要 HTTPS 且因為增益集命令無 UI,您無法接受無效的憑證。執行 [./gen-cert.sh](#gen-cert.sh) 來建立憑證,然後您必須將 ca.crt 安裝到您的信任根目錄憑證授權存放區 (Windows)。
45 |
46 | ## 如何設定和執行應用程式
47 |
48 | 1. 安裝 TypeScript 定義管理員,方法是在命令列輸入 ```npm install typings -g```。
49 | 2. 安裝 typings.json 中識別的 Typescript 定義,方法是在專案根目錄的命令列執行 ```typings install```。
50 | 3. 安裝 package.json 中識別的專案相依性,方法是在專案的根目錄執行 ```npm install```。
51 | 4. 安裝 gulp ```npm install -g gulp```。
52 | 5. 複製 Fabric 和 JQuery 檔案,方法是執行 ```gulp copy:libs```。(Windows) 如果您在這裡有問題,請確定 *%APPDATA%\npm* 在您的路徑變數中。
53 | 6. 執行預設 gulp 工作,方法是從專案的根目錄執行 ```gulp```。如果 TypeScript 定義沒有更新,您會在這裡遇到錯誤。
54 |
55 | 目前您已部署這個範例增益集。現在,您需要讓 Word 知道哪裡可以找到此增益集。
56 |
57 | ### Word 2016 for Windows 設定
58 |
59 | 1. (僅限 Windows) 解壓縮及執行這個[登錄機碼](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark)來啟動增益集命令功能。當增益集命令是**預覽功能**時,這是必要項目。
60 | 2. 建立網路共用,或[共用網路資料夾](https://technet.microsoft.com/en-us/library/cc770880.aspx),並將 [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml) 資訊清單檔案放置在其中。
61 | 3. 啟動 Word 並開啟一個文件。
62 | 4. 選擇 [檔案]**** 索引標籤,然後選擇 [選項]****。
63 | 5. 選擇 [信任中心]****,然後選擇 [信任中心設定]**** 按鈕。
64 | 6. 選擇 [受信任的增益集目錄]****。
65 | 7. 在 [目錄 URL]**** 方塊中,輸入包含 manifest-word-add-in-canvas.xml 的資料夾共用的網路路徑,然後選擇 [新增目錄]****。
66 | 8. 選取 [顯示於功能表中]**** 核取方塊,然後選擇 [確定]****。
67 | 9. 接著會顯示訊息,通知您下次啟動 Office 時就會套用您的設定。關閉並重新啟動 Word。
68 |
69 | ## 如何在 Word 2016 for Windows 中執行增益集
70 |
71 | 1. 開啟 Word 文件。
72 | 2. 在 Word 2016 的 [插入]**** 索引標籤上,選擇 [我的增益集]****。
73 | 3. 選取 [共用資料夾]**** 索引標籤。
74 | 4. 選擇 [影像圖說文字增益集]****,然後選取 [插入]****。
75 | 5. 如果您的 Word 版本支援增益集命令,UI 會通知您已載入增益集。您可以使用 [圖說文字增益集]**** 索引標籤,在 UI 中載入增益集,並將影像插入文件。您也可以使用右鍵內容功能表來將影像插入文件。
76 | 6. 如果您的 Word 版本不支援增益集命令,增益集會載入工作窗格。您必須將圖片插入 Word 文件,以使用增益集的功能。
77 | 7. 在 Word 文件中選取影像,將其載入工作窗格,方法是從 doc* 選取*載入影像。您現在可以將圖說文字插入影像。選取 *將影像插入文件* 已將更新的影像插入 Word 文件。增益集將會產生每個圖說文字的預留位置描述。
78 |
79 | ## 常見問題集
80 |
81 | * 增益集命令是否可在 Mac 和 iPad 上運作?否,在此讀我檔案發佈時,無法在 Mac 或 iPad 上運作。
82 | * 為什麼我的增益集未顯示在 [我的增益集]**** 視窗中?您的增益集資訊清單可能有錯誤。建議您針對[資訊清單結構描述](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD)驗證資訊清單。
83 | * 為什麼無法針對我的增益集命令呼叫函數檔案?增益集命令需要 HTTPS。由於增益集命令需要 TLS,而且沒有 UI,您無法查看是否有憑證問題。如果您必須在工作窗格中接受不正確的憑證,則增益集命令無法運作。
84 | * 為什麼 npm 安裝命令懸置?可能不是懸置。在 Windows 上需要一段時間。
85 |
86 | ## 問題和建議
87 |
88 | 我們很樂於收到您對於影像圖說文字 Word 增益集範例的意見反應。您可以在此儲存機制的[問題](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues)區段中,將您的問題及建議傳送給我們。
89 |
90 | 請在 [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API) 提出有關增益集開發的一般問題。務必以 [office-js]、[word-addins] 和 [API] 標記您的問題或意見。我們會查看這些標記。
91 |
92 | ## Learn more
93 |
94 | 這裡有更多的資源,可協助您建立以 Word Javascript API 為基礎的增益集︰
95 |
96 | * [Word 增益集的文件和範例](https://dev.office.com/word)
97 | * [SillyStories 範例](https://github.com/OfficeDev/Word-Add-in-SillyStories) - 了解如何從服務中載入 docx 檔案,以及將檔案插入開啟的 Word 文件。
98 | * [Node.js 的 Office 增益集伺服器驗證範例](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) - 了解如何使用 Azure 和 Google OAuth 提供者來驗證增益集使用者。
99 |
100 | ## 著作權
101 | Copyright (c) 2016 Microsoft.著作權所有,並保留一切權利。
102 |
--------------------------------------------------------------------------------
/ReadMe.md:
--------------------------------------------------------------------------------
1 | # [ARCHIVED] Image callouts Word add-in sample: load, edit, and insert images
2 |
3 | **Note:** This repo is archived and no longer actively maintained. Security vulnerabilities may exist in the project, or its dependencies. If you plan to reuse or run any code from this repo, be sure to perform appropriate security checks on the code or dependencies first. Do not use this project as the starting point of a production Office Add-in. Always start your production code by using the Office/SharePoint development workload in Visual Studio, or the [Yeoman generator for Office Add-ins](https://github.com/OfficeDev/generator-office), and follow security best practices as you develop the add-in.
4 |
5 | **Table of contents**
6 |
7 | * [Summary](#summary)
8 | * [Required tools](#required-tools)
9 | * [How to install certificates](#how-to-install-certificates)
10 | * [How to set up and run the app](#how-to-set-up-and-run-the-app)
11 | * [How to run the add-in in Word 2016 for Windows](#how-to-run-the-add-in-in-Word-2016-for-Windows)
12 | * [FAQ](#faq)
13 | * [Questions and comments](#questions-and-comments)
14 | * [Learn more](#learn-more)
15 |
16 |
17 | ## Summary
18 |
19 | This Word add-in sample shows you how to:
20 |
21 | 1. Create a Word add-in with Typescript.
22 | 2. Load images from the document into the add-in.
23 | 3. Edit images in the add-in by using the HTML canvas API and insert the images into a Word document.
24 | 4. Implement add-in commands that both launch an add-in from the ribbon and run a script from both the ribbon and a context menu.
25 | 5. Use the Office UI Fabric to create a native Word-like experience for your add-in.
26 |
27 | 
28 |
29 | Definition- **add-in command**: an extension to the Word UI that allows you to either launch the add-in in a task pane or run a script, from either the ribbon or a context menu.
30 |
31 | If you just want to see this in action, skip to [Word 2016 for Windows set up](#word-2016-for-windows-set-up) and use this [manifest](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/blob/deploy2Azure/manifest-word-add-in-canvas.xml).
32 |
33 | ## Required tools
34 |
35 | To use the Image callouts Word add-in sample, the following are required.
36 |
37 | * Word 2016 16.0.6326.0000 or higher, or any client that supports the Word Javascript API. This sample does a requirement check to see if it is running in a supported host for the JavaScript APIs.
38 | * npm (https://www.npmjs.com/) to install the dependencies. It comes with [NodeJS](https://nodejs.org/en/).
39 | * (Windows) [Git Bash](http://www.git-scm.com/downloads).
40 | * Clone this repo to your local computer.
41 |
42 | > Note: Word for Mac 2016 does not support add-in commands at this time. This sample can run on the Mac without the add-in commands.
43 |
44 | ## How to install certificates
45 |
46 | You'll need a certificate to run this sample since add-in commands require HTTPS and since add-in commands are UI-less, you can't accept invalid certificates. Run [./gen-cert.sh](#gen-cert.sh) to create the certificate and then you'll need to install ca.crt into your Trusted Root Certification Authorities store (Windows).
47 |
48 | ## How to set up and run the app
49 |
50 | 1. Install the TypeScript definition manager by typing ```npm install typings -g``` at the command line.
51 | 2. Install the Typescript definitions identified in typings.json by running ```typings install``` in the project's root directory at the command line.
52 | 3. Install the project dependencies identified in package.json by running ```npm install``` in the project's root directory.
53 | 4. Install gulp ```npm install -g gulp```.
54 | 5. Copy the Fabric and JQuery files by running ```gulp copy:libs```. (Windows) If you have an issue here, make sure that *%APPDATA%\npm* is in your path variable.
55 | 6. Run the default gulp task by running ```gulp``` from the project's root directory. If the TypeScript definitions aren't updated, you'll get an error here.
56 |
57 | You've deployed this sample add-in at this point. Now you need to let Word know where to find the add-in.
58 |
59 | ### Word 2016 for Windows set up
60 |
61 | 1. (Windows only) Unzip and run this [registry key](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/AddInCommandsUndark) to activate the add-in commands feature. This is required while add-in commands are a **preview feature**.
62 | 2. Create a network share, or [share a folder to the network](https://technet.microsoft.com/en-us/library/cc770880.aspx) and place the [manifest-word-add-in-canvas.xml](manifest-word-add-in-canvas.xml) manifest file in it.
63 | 3. Launch Word and open a document.
64 | 4. Choose the **File** tab, and then choose **Options**.
65 | 5. Choose **Trust Center**, and then choose the **Trust Center Settings** button.
66 | 6. Choose **Trusted Add-ins Catalogs**.
67 | 7. In the **Catalog Url** box, enter the network path to the folder share that contains manifest-word-add-in-canvas.xml and then choose **Add Catalog**.
68 | 8. Select the **Show in Menu** check box, and then choose **OK**.
69 | 9. A message is displayed to inform you that your settings will be applied the next time you start Office. Close and restart Word.
70 |
71 | ## How to run the add-in in Word 2016 for Windows
72 |
73 | 1. Open a Word document.
74 | 2. On the **Insert** tab in Word 2016, choose **My Add-ins**.
75 | 3. Select the **Shared folder** tab.
76 | 4. Choose **Image callout add-in**, and then select **Insert**.
77 | 5. If add-in commands are supported by your version of Word, the UI will inform you that the add-in was loaded. You can use the **Callout add-in** tab to load the add-in in the UI and to insert an image into the document. You can also use the right-click context menu to insert an image into the document.
78 | 6. If add-in commands are not supported by your version of Word, the add-in will load in a task pane. You'll need to insert a picture into the Word document to use the functionality of the add-in.
79 | 7. Select an image in the Word document, and load it into the taskpane by selecting *Load image from doc*. You can now insert callouts into the image. Select *Insert image into doc* to place the updated image into the Word doc. The add-in wil generate placeholder descriptions for each of the callouts.
80 |
81 | ## FAQ
82 |
83 | * Will add-in commands work on Mac and iPad? No, they won't work on the Mac or iPad as of the publication of this readme.
84 | * Why doesn't my add-in show up in the **My Add-ins** window? Your add-in manifest may have an error. I suggest that you validate the manifest against the [manifest schema](https://github.com/OfficeDev/Office-Add-in-Commands-Samples/tree/master/Tools/XSD).
85 | * Why doesn't the function file get called for my add-in commands? Add-ins commands require HTTPS. Since the add-in commands require TLS, and there isn't a UI, you can't see whether there is a certificate issue. If you have to accept an invalid certificate in the taskpane, then the add-in command will not work.
86 | * Why do npm install commands hang? It probably isn't hung. It just takes a while on Windows.
87 |
88 | ## Questions and comments
89 |
90 | We'd love to get your feedback about the Image callout Word add-in sample. You can send your questions and suggestions to us in the [issues](https://github.com/OfficeDev/Word-Add-in-TypeScript-Canvas/issues) section of this repository.
91 |
92 | Questions about add-in development in general should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Make sure that your questions or comments are tagged with [office-js], [word-addins], and [API]. We are watching these tags.
93 |
94 | ## Learn more
95 |
96 | Here are more resources to help you create Word Javascript API based add-ins:
97 |
98 | * [Word Add-ins documentation and samples](https://dev.office.com/word)
99 | * [SillyStories sample](https://github.com/OfficeDev/Word-Add-in-SillyStories) - learn how to load docx files from a service and insert the files into an open Word document.
100 | * [Office Add-in Server Authentication Sample for Node.js](https://github.com/OfficeDev/Office-Add-in-Nodejs-ServerAuth) - learn how use Azure and Google OAuth providers for authenticating add-in users.
101 |
102 | ## Copyright
103 | Copyright (c) 2016 Microsoft. All rights reserved.
104 |
--------------------------------------------------------------------------------
/Word-Add-in-TypeScript-Canvas.yml:
--------------------------------------------------------------------------------
1 | ### YamlMime:Sample
2 | sample:
3 | - name: 'Word add-in: Load, edit, and insert images'
4 | path: ''
5 | description: Learn how you can use TypeScript and the HTML Canvas API to extend the image editing capability in a Word document.
6 | readme: ''
7 | generateZip: FALSE
8 | isLive: TRUE
9 | technologies:
10 | - Office Add-ins
11 | azureDeploy: ''
12 | author: MIchaelMainer
13 | platforms: []
14 | languages:
15 | - TypeScript
16 | extensions:
17 | products:
18 | - Word
19 | scenarios: []
20 |
--------------------------------------------------------------------------------
/gen-cert.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | if [[ $(uname) == *"MINGW"* ]]
5 | then
6 | # This script is intended to run in Git Bash environment. Note the form for -subj
7 | echo "Generating RSA key for the root CA and store it in ca.key:"
8 | openssl genrsa -out ca.key 4096
9 |
10 | echo ""
11 | echo "Create the self-signed root CA certificate in ca.crt:"
12 | # openssl req -new -x509 -days 1826 -key ca.key -out ca.crt -subj "OU=word-add-in-typescript-canvas/CN=localhost-ca"
13 | openssl req -new -x509 -days 1826 -key ca.key -out ca.crt -subj "//C=US\ST=WA\L=Redmond\O=MaxDevAddins\OU=word-add-in-typescript-canvas\CN=localhost-ca"
14 |
15 | echo ""
16 | echo "Create private key for subordinate CA:"
17 | openssl genrsa -out ia.key 4096
18 |
19 | echo ""
20 | echo "Request a certificate for the subordinate CA:"
21 | # openssl req -new -key ia.key -out ia.csr -subj "OU=word-add-in-typescript-canvas/CN=localhost"
22 | openssl req -new -key ia.key -out ia.csr -subj "//C=US\ST=WA\L=Redmond\O=MaxDevAddins\OU=word-add-in-typescript-canvas\CN=localhost"
23 |
24 | echo ""
25 | echo "Process the subordinate CA cert request and sign it with the root CA:"
26 | openssl x509 -req -days 730 -in ia.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out ia.crt
27 |
28 | echo ""
29 | echo "NEXT STEP (required): install the root CA (ca.crt) in your Trusted Root Certification Authorities store."
30 | else
31 | echo "create certs not with Git Bash env, you'll need to set execute perms: chmod +x gen-cert.sh"
32 | fi
33 |
34 |
35 |
--------------------------------------------------------------------------------
/gulpfile.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "lib": {
3 | "source": "node_modules",
4 | "dest": "www\\lib"
5 | },
6 | "app": {
7 | "source": "src",
8 | "dest": "www"
9 | },
10 | "server": {
11 | "root": "www\\",
12 | "host": "localhost",
13 | "port": 8085,
14 | "fallback": "www\\index.html",
15 | "serverkey": "ia.key",
16 | "servercert": "ia.crt",
17 | "cacert": "ca.crt",
18 | "passphrase": ""
19 | }
20 | }
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information
4 | */
5 |
6 | /*
7 | Gulp task configuration for transcompiling TypeScript, interpreting SASS into CSS,
8 | reading certs, live reload, and copy files for serving up for the add-in. The gulp-connect
9 | server provides logging (with the debug switch) so that you can see whether calls are
10 | being made to the add-in command function file. LiveReload is helpful as you can see
11 | your changes reflected in a running add-in without have to restart the development
12 | server.
13 | */
14 | 'use strict';
15 |
16 | var gulp = require('gulp'),
17 | plumber = require('gulp-plumber'),
18 | del = require('del'),
19 |
20 | sass = require('gulp-sass'),
21 |
22 | fs = require('fs'),
23 |
24 | typescript = require('gulp-typescript'),
25 | sourcemaps = require('gulp-sourcemaps'),
26 | tsConfigGlob = require('tsconfig-glob'),
27 | merge = require('merge2'),
28 |
29 | connect = require('gulp-connect'),
30 | config = require('./gulpfile.config.json'),
31 | packageConfig = require('./package.json'),
32 | errorHandler = function (error) {
33 | console.log(error);
34 | this.emit('end');
35 | };
36 |
37 | // Create a TypeScript project. This is used in the compile:ts task.
38 | var tsProject = typescript.createProject('./tsconfig.json', {
39 | sortdest: true
40 | });
41 |
42 | // Deletes all of the files in www directory. See gulpfile.config.json.
43 | gulp.task('clean', function (done) {
44 | return del(config.server.root, done);
45 | });
46 |
47 | // Specifies glob patterns for tsconfig file.
48 | gulp.task('ref', function () {
49 | return tsConfigGlob();
50 | });
51 |
52 | // Runs the 'clean' task and copies the packages specified in the
53 | // package.json overrides key to the www/lib directory.
54 | gulp.task('copy:libs', ['clean'], function (done) {
55 | return Object.keys(packageConfig.overrides)
56 | .map(function (key) {
57 | try {
58 | var value = packageConfig.overrides[key];
59 | if (Array.isArray(value)) {
60 | var files = value.map(function (filePath) {
61 | console.log('Copied: ', filePath);
62 | return config.lib.source + "/" + key + "/" + filePath;
63 | });
64 | return gulp.src(files)
65 | .pipe(plumber(errorHandler))
66 | .pipe(gulp.dest(config.lib.dest));
67 | } else {
68 | var file = config.lib.source + "/" + key + "/" + value;
69 | console.log('Copied: ', value);
70 | return gulp.src(file)
71 | .pipe(plumber(errorHandler))
72 | .pipe(gulp.dest(config.lib.dest));
73 | }
74 | } catch (exception) {
75 | console.error('Failed to load package: ', key);
76 | }
77 | });
78 | });
79 |
80 | // Interprets the SASS file to CSS files and puts the CSS file
81 | // into the www directory as specified in gulpfile.config.json.
82 | // Reloads the add-in.
83 | gulp.task('compile:sass', function () {
84 | return gulp.src(config.app.source + "/**/*.scss")
85 | .pipe(plumber(errorHandler))
86 | .pipe(sass())
87 | .pipe(gulp.dest(config.app.dest))
88 | .pipe(connect.reload());
89 | });
90 |
91 | // Transcompiles the TypeScript files into JavaScript and places the
92 | // files into the www directory as specified in gulpfile.config.json.
93 | // Reloads the add-in.
94 | gulp.task('compile:ts', ['ref'], function () {
95 | var tsResult = tsProject.src()
96 | .pipe(sourcemaps.init())
97 | .pipe(plumber(errorHandler))
98 | .pipe(typescript(tsProject));
99 |
100 | tsResult.js
101 | .pipe(sourcemaps.write('./'))
102 | .pipe(gulp.dest(config.app.dest))
103 | .pipe(connect.reload());
104 | });
105 |
106 | // Copies the non TypeScript and SASS files in the src directory to the
107 | // www directory.
108 | gulp.task('copy:misc', function () {
109 | gulp.src(config.app.source + "/**/!(*.ts|*.scss)", {
110 | base: config.app.source
111 | })
112 | .pipe(plumber(errorHandler))
113 | .pipe(gulp.dest(config.app.dest));
114 | });
115 |
116 | // Copies files from src to www directories and reloads the add-in.
117 | gulp.task('refresh', ['copy:misc'], function () {
118 | gulp.src(config.app.source + "/**/!(*.ts|*.scss)")
119 | .pipe(connect.reload())
120 | .pipe(plumber(errorHandler));
121 | });
122 |
123 | // Watches for changes to source files, kicks off compile tasks,
124 | // and then reloads the add-in. This makes development much better.
125 | gulp.task('watch', function () {
126 | gulp.watch(config.app.source + "/**/*.scss", ['compile:sass']);
127 | gulp.watch(config.app.source + "/**/*.ts", ['compile:ts']);
128 | gulp.watch(config.app.source + "/**/!(*.ts|*.scss)", ['refresh']);
129 | });
130 |
131 | // Bundles the compile tasks.
132 | gulp.task('compile', ['compile:sass', 'compile:ts', 'copy:misc']);
133 |
134 | // Default gulp task. Configures the dev web server endpoint, compiles
135 | // TypeScript and SASS, specifies certs for HTTPS. See gulpfile.config.json
136 | // for key values.
137 | gulp.task('default', ['compile', 'watch'], function () {
138 | return connect.server({
139 | root: config.server.root,
140 | host: config.server.host,
141 | port: config.server.port,
142 | https: {
143 | key: fs.readFileSync(config.server.serverkey),
144 | cert: fs.readFileSync(config.server.servercert),
145 | ca: fs.readFileSync(config.server.cacert),
146 | passphrase: config.server.passphrase
147 | },
148 | livereload: true,
149 | debug: true
150 | });
151 | });
--------------------------------------------------------------------------------
/manifest-word-add-in-canvas.xml:
--------------------------------------------------------------------------------
1 |
2 |
Select an image in the Word document and then load it.
44 |In the add-in, place a callout by clicking the mouse.
45 |