You need to echo the field value, not just return it. get_sub_field()
is for returning it (i. e. to store it in a variable and do something with it afterwards), and for directly echoing it you would use the_sub_field()
(spot the little difference between “get” and “the”).
However, you can, of course, also go the little detour of storing the value in a variable and then echoing that variable; so, in your example, you would do:
$sub_value = get_sub_field(‘document_text’);
…
…
echo($sub_value);