I wanted to add a link to a local file, like "file:///C:/dir/some/file.pdf", in TYPO3.
I can add the link in the backend-text editor moreover; when I display the source-code, the Link is correct. However, in the frontend the url of this same link is missing in the html-code which means the browser won't display it as a link (obviously because it is not a valid link at this point).
Example code in the backend:
Link-Name</p>
Result in the front end:
<a target="_blank">Link-Name</a>
Do any of you have an idea how I can fix this problem?
Souji
If you want to add a file:/// link in the Rich Text Editor (htmlarea) of TYPO3 up to 7.6, you need to add the parameter rtekeep="1" to the link, e.g. like this:
Link-Name
As far as I know this doesn't work in TYPO3 8.7 and newer versions which use a new Rich Text Editor called CKEditor.
By the way, not all browsers support the file:// protocol anymore.
Related
How can I display Microsoft Word file in HTML page using either Angular or JavaScript. Please suggest any libraries which provide this functionality.
No browsers currently have the code necessary to render Word
Documents, and as far as I know, there are no client-side libraries
that currently exist for rendering them either
However, if you only need to display the Word Document, but don't need
to edit it, you can use Google Documents' Viewer via an to
display a remotely hosted .doc/.docx.
<iframe src="http://docs.google.com/gview?url=http://remote.url.tld/path/to/document.doc&embedded=true"></iframe>
Example:
jsfidle
However, if you'd rather have native support, in most, if not all browsers, I'd recommend resaving the .doc/.docx as a PDF file Those can also be independently rendered using PDF.js by Mozilla.
Edit:
Huge thanks to fatbotdesigns for posting the Microsoft Office 365 viewer in the comments.
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=http://remote.url.tld/path/to/document.doc' width='1366px' height='623px' frameborder='0'>This is an embedded <a target='_blank' href='http://office.com'>Microsoft Office</a> document, powered by <a target='_blank' href='http://office.com/webapps'>Office Online</a>.</iframe>
Live Examples:
Google Docs Viewer
Microsoft Office Viewer
So what I found from my research is you can not display a word file using java script or angular, it only opens up a dialog box to download the file.
Here are some links backing my conclusion.
display doc file in HTML link1
display doc file in HTML link2
As an alternate what you can do is convert word file to HTML and preview it in browser. Mammoth.JS is the best option for this.
I am using socialengine as content management system, when i change the socialengine site to production mode it did not load the css file, I figured out that my $staticBaseUrl function is not returning the website name.
I manually added the path in default layout to load the css file, it works but a font family (centurygothic) is not loads. I am using SocialEngine's 4.2.4 version, please help.
I am using plesk panel for as hosting server.
If you use paths in your css file (theme_name/main.css or Modulename/externals/styles/main.css), you can use following way of indicating path:
~/application/..., where ~ will be automatically parsed and replaced by staticbaseurl.
Firstly no need to manually adjust the $staticBaseUrl in the layout. There is a setting in the admin panel (general settings) where you just specify what the URL is. This is commonly used to set the CDN URL.
Secondly, most of the CSS files in production get minimized and appended to each other, so you will only see one query similar to this: /application/css.php?request=application/themes/default/theme.css
Thirdly, if there is still an issue there may be a number of reasons. For example, are you using the http://example.com/home or http://example.com/index.php/home URL format?
I am using ExtJs 4.2. In my java application I am using the ExtJS calendar (I am using Eclipse Indigo IDE for developement) in one of my JSP.
Now I am getting a pop up to save the event when I click on any date in month format. But I want to display one of my custom JSP when clicked on any day on the ExtJS calendar instead of the pop up which is another JavaScript file.
So I changed in App.js file present in examples/calendar/src folder to get the required JSP. I changed in
showEditWindow : function(rec, animateTarget)
method and instead of the function body where the pop up was coming I wrote the line
window.navigate("my jsp path in eclipse")
It is working fine if I am executing the file in my Tomcat server using Eclipse browser. But if I use any other browser then the functionality is not working (i.e nothing happening when I am clicking on the date).
I am totally new to JavaScript environment. So even if a small or any other suggestion also can be helpful.
So pls anybody help me out here...
Regards
Dev
window.navigate() is an IE specific implementation and its not a standard way of doing it. It will not work on all browsers.
Use window.location.href instead
Instead of window.navigate("my jsp path in eclipse"); ,
Use window.location.href = "my jsp path in eclipse";
I'm in the process of building a mobile site (for Iphones and Androids... I think Blackberry is out of it)
Here the problem I'm with. We want to have a link that, when clicked, automatically adds the contact in the .vcf file to the address book of the mobile device (with some confirmation of some sort that the iPhone/Android must already be handling by itself)
The solution I've tried would be to create a link, directly pointing to the .vcf file. It didn't work. My iTouch was even asking what to open that file with... and the Contact app was not even in the list.
I've heard that a Card of that sort would do exactly what we want if it would come from an email... thing is, we are building up a webpage here.
We use HTML5, no PhP (not yet, could be added later for this problem) and there is no CMS involved.
[UPDATED - Sep 2013 - iOS7 now supports direct download of VCARDs from we page and import into native contact application]
Complete solution using VCALENDAR file with emebedded VCARD file is published here
iPhone: how to get safari to recognize a vcard?
which includes link to my blog with full source code on the subject at
http://mobicontact.info/iphone/download-contact-from-web-page/
I hope this is of some help...
Firstly, iPhone doesn't support vCard. There is no way to download a contact file from the web. What you could do is create a simple page which contains links to the phone number, like this:
Call Dave
Secondly, to get an Android (or other device) to recognise the vCard, you need to set the header to the correct MIME type
Content-Type: text/vcard
You should be able to configure your server to send all files of .vcf as text/vcard.
how do i upload an image to the portal and use it in my html of my html module?
i have an html module i want to use and part of it is an image. how do i upload to my portal and then reference the url where it is on my server inside my html?
In case you didn't see my comments on the other one. One way is to just find the file on the hard drive and figure out the link manually in relation to your web root. But if you are using this as a portal system then this might not be the best solution.
There is also upload option right withing html editor. click on image manager icon and it will give you the option to upload an image.
alt text http://images.devs-on.net/Image/rw5tTdgNRgs22f1-MyWebsiteHomeAlp.png
alt text http://images.devs-on.net/Image/YjlGTN1GTUVMR1p-MyWebsiteHomeAlp.png
If your HTML is being put in the DNN HTML module, you could also use the media picker baked in.
If you want a more integrated option, you could use the DNN FileManager API to accomplish integrated uploading and retrieving of files. The DNNFilePickerUploader might come in handy for this, which will give you a DNN file ID which you could the use to get the image url.