Inside my home.tpl, I deleted everything. But when I go to /index.php?route=common/home, it shows like this at the top:
I also tried to open home.tpl using Notepad++ and encoded it as "UTF-8 without BOM". For another page this is working fine.
Related
Quick question.
I try to post the script to a Gist in Ckeditor, in my Django website. Whenever I post the < script > in the editor, it just shows up as raw code. My work around for this was editing the raw file, inserting the < script >. Which worked, except for some reason if I need to alter anything else in the code I have to reinsert it again. Any workaround for this?
I was using the codeblocks feature of ckeditor, but I like the formatting of embedded gists better because it shows line numbers, etc.
I've tried loading a local html file using webkit_web_view_load_uri() with a file:// URL. However, the webview would display a blank page. To circumvent this, I tried using webkit_web_view_load_html() and it worked correctly.
Now that I'm trying to load some images in the html using the <img> tag, the images aren't loaded (It displays a blank page).
I'm puzzled because I tried before (~ 2 months ago) a similar method and it worked.
Note: I copied the contents of the generated HTML into a file and loaded it with Firefox and it worked as it should (The images are visible), but with another WebKitGtk application I had lying around the images didn't load.
Note: I'm using C++ as the main programming language (I'd prefer having C++ types in the solutions only if possible)
Note: I have set webkit_settings_set_allow_file_access_from_file_urls() and webkit_settings_set_allow_universal_access_from_file_urls() to TRUE
Ok, I've managed to solve this. The solution had NOTHING to do with webkitgtk, which is strange. It seems that the application was trying to download the page instead of loading it. This traces to a faulty MIME type database.
Tl;Dr:
Execute this:
rm ~/.local/share/mime/packages/user-extension-html.xml
update-mime-database ~/.local/share/mime
and use webkit_web_view_load_uri() instead of webkit_web_view_load_html() with a file:// URI
I had the same problem in C. You have to explicitly set file:// as base_uri when you call webkit_web_view_load_html().
See also answer here
I am trying to use primefaces advanced fileupload, however I have noticed that when the extension is in uppercase the preview does not work. Below is the upload code.
<p:fileUpload fileUploadListener="${myController.handleFileUpload}"
mode="advanced" id="fileupload"
sizeLimit="2000000" uploadLabel="Add"
dragDropSupport="false" previewWidth="190"
label="Browse" style="width: 600px;height: 200px"
required="true" update="fileDescId"
allowTypes="/(\.|\/)(gif|jpe?g|png|GIF|JPG|JPEG|PNG)$/i"/>
Searching on google has not yielded much, I found that adding /i at the end of allowTypes makes the regex case insensitive but still the preview does not show. If I click upload it upload successfully even if the preview did not show, but I need the preview because a description of the image is required.
I figured out your problem. The problem in the file \META-INF\resources\primefaces\fileupload\fileupload.js. Preview images are only available for png, jpg and gif files and for this there is a check:
//preview
if($this.isCanvasSupported() && window.File && window.FileReader && $this.IMAGE_TYPES.test(file.name))
and pattern:
IMAGE_TYPES: /(\.|\/)(gif|jpe?g|png)$/
As you can see in this place lacks the flag for case insensitive validation. So i manually add this flag
IMAGE_TYPES: /(\.|\/)(gif|jpe?g|png)$/i
and preview started working as it should. I checked several times, cleaned and put the flag, everything works.
So I sent the corresponding patch.
Is there an easy way to link to a webpage in rmarkdown without displaying the link?
For example, putting "https://www.google.com/" in a .rmd file renders as the entire website, but I want something analogous to ABC instead.
The html method above, i.e., <a href= ... works when I knit to html, but it does not work when I knit to a word document.
Markdown provides two ways to create a link as you mention (and I suppose that is supported on rmarkdown).
Markdown way:
[ABC](http://example.com)
HTML way:
ABC
The first way is native and the second way is supported since Markdown allows every HTML code.
In coldfusion 8, I used bellow code to view "UserDesc"field data from database table that is working on well IE and chrome but not on Firefox. On firefox it does not display on fckeditor,but shows on textarea. please suggest any change in code.
<cfmodule
template="fckeditor/fckeditor.cfm"
basePath="../views/fckeditor/"
instanceName="Question"
value='#UrlDecode(UserDesc)#'
width="530"
height="260">
There are a few newer ways to use the ckeditor in Coldfusion. You can just use the following (this may be cf9+ only, i'm not sure):
<cftextarea name="Question" id="Question"
richtext="yes"
value="#UrlDecode(UserDesc)#">
</cftextarea>
Or you could just use the javascript one as demo'd here (this should work for any version of coldfusion): http://ckeditor.com/demo You would just have to put your value in between the opening and closing text area tags.