Can ColdFusion Builder 3 format HTML - coldfusionbuilder

CTRL + SHIFT + F does not seem to do anything to HTML inside of a cfm document. Is there a way to also format HTML inside of ColdFusion Builder 3?

Related

Comments on In Xcode 7 playground is not showing is markup format

I am trying to change the format for comments into markup format introduced in Xcode 7 playgrounds. I have clicked rendered markup in "Editor -> Show Rendered Markup. It does show the comments already written in the playground in markup format but doesn't simultaneously convert the ones I create in it. In order for that to be converted into markup format, I either have to close the playground file or change it to raw markup and then back to rendered markup. Isn't it supposed to convert it into markup format the same instant I type a new comment?
Thanks in advance.
No, that is not the intention of the playground markdown. It is more like the message you type here in stackoverflow: The markdown is meant to be usable in plain text mode (when you type).
Also while you type, Playground is trying to execute your code, not update the playground display.
I think the behavior is intentional.
It worked for me in Xcode 9.1
Rendered Markup
Clicking Editor -> Show Rendered Markup
Raw Markup
Clicking Editor -> Show Raw Markup

What does the mozdisallowselectionprint attribute in PDF.js do?

Firefox' built-in PDF viewer, PDF.js, has a mozdisallowselectionprint attribute on the <html> tag. What does this attribute do?
The mozDisallowSelectionPrint attribute was added to Firefox to allow web pages to disable the print selection option in Firefox.
Normally, when you select text in a document and then open the print dialog (Ctrl + P or Cmd + P), you can choose the option "Selection" under "Print range".
Because of the way PDF.js works, selecting this option when viewing a PDF document would either result in empty pages being printed or, for large documents, a browser crash.
In bug 830278 it was therefore decided to allow web pages, including the PDF viewer, to disable the option to print selections by adding this attribute to the HTML tag..
(source: broward.edu)
mozDisallowSelectionPrint is available from Firefox 19 and onwards.

How do you apply Markdowndeep to text in view using Razor syntax?

So I followed a tutorial setting up a Markdowndeep editor using MVC and the editor and preview work just fine. The tutorial didn't mention how to render specific text on a page using Markdowndeep though. So I did a few Google searches thinking I'd find an obvious answer but to my surprise I didn't.
Can someone show me an example on how to render a portion of text using Razor?
I figured out the syntax. It was #Html.Markdown(Model.Body)
You must have Markdown Helper installed though.
Another option is to force Razor to return the RAW Html.
If we extend the MarkDownDeep Example, we get the following:
// Instantiate
var md=new MarkdownDeep.Markdown();
// Set options
md.ExtraMode=true;
// Translate
var html=md.Transform(plaintext);
<div>#Html.Raw(html)</div>
and your markdown as HTML should be in the div!

JSP code to display a JFreeChart using Struts2

All,
I have been trying to use this guide to render a JFreeChart on a JSP page. Could someone help me out with the JSP code required to show this on a tabbed panel using the struts-dojo-tags.
Eventually I want to render a different graph on each tab and refresh them using AJAX.
At the moment I have configured everything as shown in the link.
Update:
Here is the code from the struts2 guide which I am using:
<sx:tabbedpanel id="tabContainer">
<sx:div label="Local Tab 1" >
Tab 1
</sx:div>
<sx:div label="Remote Tab 2" href="%{#url}">
Remote Tab 2
</sx:div>
</sx:tabbedpanel>
Where url refers to my action which returns the chart result. This returns a lot of symbols on the tab so clearly it can't show the returned png.
I can also view the chart if I insert <img src="http://localhost:8080/myApp/myaction"> so the action does work correctly.
Do I need to create another JSP page which the url can point to which simply contains an image which gets a chart from my action?
Thanks,
Alex
I would suggest that you start gradually in steps
Make sure that the chart is indeed created (already done)
Create a single HTML page with an img tag that points to the url (see if this works)
Create a single JSP page with an img tag (see if this works)
Create a Struts 2 JSP page with an img tag (see if this works)
Create a Struts 2 JSP page with an img tag in a tab (see if this works)
Create a Struts 2 JSP page with an img tag in a tab that updates dymanically with Ajax
This way you can isolate the problem instead of throwing everything in the mix at once.
But in general you do NOT need another JSP page that contains the image.

How to extract website information using XPath inside firefox extension?

I have made a firefox extension which loads a web page using xmlhttprequest.
My extension has it's own window opened alongside the main Firefox.
The idea of my extension is to load a webpage in memory, modify it and publish in newly opened tab in firefox.
The webpage has a div with id "Content". And that's the div i want to modify. I have been using XPath alot in greaseMonkey scripts and so i wanted to use it in my extension, however, i have a problem. It seems it doesn't work as i would want. I always get the result of 0.
var pageContents = result.responseText; //webpage which was loaded via xmlhttprequest
var localDiv = document.createElement("div"); //div to keep webpage data
localDiv.innerHTML = pageContents;
// trying to evaluate and get the div i need
var rList = document.evaluate('//div[#id="content"]', localDiv, null XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
The result is always 0 as i said. Now i have created the local div to store website data because i cannot parse the text using XPath. And document in this case is my extensions XUL document/window.
I did expect it to work, but i was wrong.
I know how to extract the div using string.indexOf(str) and then slice(..). However, thats very slow and is not handy, because i need to modify the contents. Change the background, borders of the many forms inside this div. And for this job, i have not seen a better method than evaluating XPath to get all the nodes i need.
So main question is, how to use XPath to parse loaded web page in firefox extension?
Thank you
Why not load the page in a tab, then modify it in place, like Greasemonkey does?
As for your code, you don't say where it executes (i.e. what is document.location?), but assuming it runs in a XUL window, it makes no sense -- document.createElement will not create an HTML element (but a XUL div element, which has no special meaning), innerHTML shouldn't work for such element, etc.

Resources