Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote image support: [http://www.foo.com/foo.png] #52

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 7 comments
Open

Remote image support: [http://www.foo.com/foo.png] #52

GoogleCodeExporter opened this issue Apr 18, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

We have image support :
[t2t.png]
and image as a link support :
[[t2t.png] as-a-link.html]

We really NEED image from link support, something like :
[http://txt2tags.sourceforge.net/img/t2tpowered.png]
If we want to compete with Markdown and others as online markup.

Original issue reported on code.google.com by fgalla...@gmail.com on 25 Aug 2010 at 7:22

@GoogleCodeExporter
Copy link
Author

what do you think of this? It works fine for me:

%!preproc(xhtml): '\[http:\/\/([^ ].*?).png\]' '@@HOTLINK@@\1.png@@'
%!postproc(xhtml): '@@HOTLINK@@([^ ].*?).png@@' '<img align="middle" 
src="http://\1.png" border="0" alt=""/>'

%!preproc(xhtml): '\[http:\/\/([^ ].*?).jpg\]' '@@HOTLINK@@\1.png@@'
%!postproc(xhtml): '@@HOTLINK@@([^ ].*?).jpg@@' '<img align="middle" 
src="http://\1.png" border="0" alt=""/>'

(as a personnal opinion, I think we shouldn't encourage hotlinking, but on the 
other hand, it would be great to have on the website some cookbooks for 
enhancing txt2tags, maybe when txt2tags would be more modular?)




Original comment by eforg...@gmail.com on 25 Aug 2010 at 9:35

@GoogleCodeExporter
Copy link
Author

correction: the second part should be: 

%!preproc(xhtml): '\[http:\/\/([^ ].*?).jpg\]' '@@HOTLINK@@\1.jpg@@'
%!postproc(xhtml): '@@HOTLINK@@([^ ].*?).jpg@@' '<img align="middle" 
src="http://\1.jpg border="0" alt=""/>'

Original comment by eforg...@gmail.com on 25 Aug 2010 at 9:36

@GoogleCodeExporter
Copy link
Author

Eric, the Tips page on the site is where this kind of trick is documented. This 
specific issue is in:

http://txt2tags.sourceforge.net/tips.html#html-remote-image

I still have not an opinion about Florent's suggestion.

Original comment by aureliojargas@gmail.com on 25 Aug 2010 at 9:41

  • Changed title: Remote image support: [http://www.foo.com/foo.png]

@GoogleCodeExporter
Copy link
Author

Issue 124 has been merged into this issue.

Original comment by fgalla...@gmail.com on 5 Jul 2011 at 1:22

@GoogleCodeExporter
Copy link
Author

Currently even for local absolute paths I have to type 
[""/home/user/picture"".png]. I think this syntax is so confusing for such a 
simple thing that we should rate it as a bug. In my opinion we should 
definitely support the syntax [/home/user/picture.png] and 
[http://www.mysite.org/images/picture.png] for embedding pictures.

Original comment by jendriks...@gmail.com on 6 Nov 2012 at 11:03

@GoogleCodeExporter
Copy link
Author

I agree with Jendrik, same syntax for hotlinked images than for the local ones, 
the simplest is the best !

Original comment by fgalla...@gmail.com on 21 Mar 2013 at 10:38

@fgallaire
Copy link
Member

Who to do the job, @aureliojargas ? @jendrikseipp ?
This is the only one "new feature" needed for 2.7 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants