From 2275fc64d659ea58b53447086d4aca42084f1714 Mon Sep 17 00:00:00 2001 From: laminga <39699385+laminga@users.noreply.github.com> Date: Sun, 13 Jun 2021 11:39:45 -0300 Subject: [PATCH] Update elements.rst Fix error on comments code snippet. --- docs/elements.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/elements.rst b/docs/elements.rst index 3b7dc1d6a5..f9138980a9 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -482,7 +482,8 @@ The comment can contain formatted text. Once the comment has been added, it can $textrun->addText('This '); $text = $textrun->addText('is'); // link the comment to the text you just created - $text->setCommentStart($comment); + $text->setCommentRangeStart($comment); + textrun->addText(' a test'); If no end is set for a comment using the ``setCommentEnd``, the comment will be ended automatically at the end of the element it is started on.