Examples of insertXml()


Examples of org.waveprotocol.wave.client.editor.content.CMutableDocument.insertXml()

      if (document == null) {
        return;
      }
      if (from != -1) {
        Point<ContentNode> point = document.locate(from);
        document.insertXml(point, xml);
      } else {
        LineContainers.appendLine(document, xml);
      }
    }
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.CMutableDocument.insertXml()

                    // Still no selection.  Oh well, put it at the end.
                    point = doc.locate(doc.size() - 1);
                  }
                }
                XmlStringBuilder content = ImageThumbnail.constructXml(attachmentId, fileName);
                ImageThumbnailWrapper thumbnail = ImageThumbnailWrapper.of(doc.insertXml(point, content));
                thumbnail.setAttachmentId(attachmentId);
              }
            });

            attachmentView.setAttachmentId(attachmentIdGenerator.newAttachmentId());
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.CMutableDocument.insertXml()

        // Still no selection.  Oh well, put it at the end.
        point = doc.locate(doc.size() - 1);
      }
    }
    XmlStringBuilder content = ImageThumbnail.constructXml(null, filename);
    thumbnail = ImageThumbnailWrapper.of(doc.insertXml(point, content));
  }

  /** Inserts an attachment thumbnail at the current edit selection. */
  @Override
  public void onUploadFinished(String blobId) {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.CMutableDocument.insertXml()

      if (document == null) {
        return;
      }
      if (from != -1) {
        Point<ContentNode> point = document.locate(from);
        document.insertXml(point, xml);
      } else {
        LineContainers.appendLine(document, xml);
      }
    }
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.CMutableDocument.insertXml()

                int docSize = editor.getDocument().size();
                if (cursorLoc != -1) {
                  // Insert the attachment at the cursor location.
                  CMutableDocument doc = editor.getDocument();
                  Point<ContentNode> point = doc.locate(cursorLoc);
                  doc.insertXml(point, xml);
                } else {
                  LineContainers.appendLine(editor.getDocument(), xml);
                }
                // Calculate the link length for the attachment.
                to = cursorLoc + editor.getDocument().size() - docSize;
View Full Code Here

Examples of org.waveprotocol.wave.model.document.Document.insertXml()

      Blip blip = wavelet.createBlip(idGenerator.newBlipId());
      if (content != null) {
        blip.getContent().hackConsume(Nindo.fromDocOp(content, false));
      } else {
        Document doc = blip.getContent();
        doc.insertXml(Point.<Doc.N> end(doc.getDocumentElement()),
            Blips.INITIAL_CONTENT);
      }
      return blip;
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.Document.insertXml()

      Blip blip = wavelet.createBlip(idGenerator.newBlipId());
      if (content != null) {
        blip.getContent().hackConsume(Nindo.fromDocOp(content, false));
      } else {
        Document doc = blip.getContent();
        doc.insertXml(Point.<Doc.N> end(doc.getDocumentElement()),
            Blips.INITIAL_CONTENT);
      }
      return blip;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.