How to replace internal links with a view (similar like the Open Graph feature)? I would like to have the feature, that if users on my site post internal links within a text, this links are replaced by a thumbnail, node title etc. For choosing what to show instead of the link I would like to use Views.
What would be the best method to do so?


I think, a simple replacement with hook_node_submit() or
something, is not a good solution: If the user edits his content, I
want him to see only what he added himself.
I could do it within the template, but this is not very elegant, I guess.
What is about hook_url_outbound_alter(), would that be the best way?


Please give me a hint.
The correct way to do this is to write text filter and add it to input formats your users will be using. Here you have Basic description of filters and formats - for Drupal 5 and 6, but concept is still valid. They are applied on display - Drupal agrees with you that you should save just what user wrote.

You need to use hook_filter_info(). Read about it, and then about rest of filter hooks family and you will have an idea.

To provide proper content for filter, well, there is no definitive solution. If users will only input node id, simple node_load is enough. Every set of scenarios and every use case calls for it own methods. Views are elastic tools, I guess for pretty big part of use cases they can be the tool.