I'd like to use WMD with PHP Markdown Extra. I don't need any new buttons in the editor, but I need the live preview to reflect the use of the extra markdown features, most notably tables.
Is there a WMD configuration option to use a preview generated server-side? Similar to the previewParserPath value for MarkItUp? If not, what are my other options?
I'm working on a cross-language markdown implementation here: http://code.google.com/p/mdown/
It's a derivative of showdown, which is the Markdown implementation used in wmd.
It's currently 99% working in PHP and javascript, with one small non-critical bug in the javascript version.
I intend to add the features from PHP Markdown Extra ASAP, so they'll be available in both the javascript and PHP versions. In fact this was the whole reason I started this project...
So, it's not really an answer I guess, but if you're patient this should be ready by some time next week. Or, if you want to try adding it yourself, I can give you access to the project and you can take a shot at it.
Related
I need more options than third party pdf-generation libraries provide. Is it possible to generate a pdf file without using any js frameworks (server-side or client-side)?
I know there are lots of pdf-generation frameworks. I tried couple of them. But they are not enough for my project to be well optimized. I want to learn whether it's possible using pure js or not. If not, then which framework has the most options for aligning, working with columns, controlling page count etc.
I am kinda looking for a Microsoft Word like editing capability.
Also I'll be apprecited if you can teach me the logic behind the pdf-generation frameworks. I couldn't find any information about it.
UPDATE: For now, I figured out how Chrome's own pdf exporter works (Ctrl+P). And reorganized my code to build a well aligned, printable html document. Unfortunately it only works appropriately on chrome. But it works :). Now I am able to print whatever I wrote in html.
How do I export the JavaScript source code of a pdf into an editor lets say atom or such? I have not been able to find the instructions of this online (only converting html to pdf and vice versa) I am just trying to export the JavaScript source code so that it is more easily readable. Has anyone ever done this before?
I agree that this question does not belong on StackOverflow, however, for the sake of helping out my fellow man:
If you want to export all of the JavaScript from a PDF to an external editor: go into the Preferences Menu, and choose the JavaScript option:
From there, select the Use external JavaScript editor option, and set it to the Text editor of your choice.
The question does indeed not have much to do primarily with programming, and would better be moved to Superuser.
To answer directly to the question and the comment, you specify whether Acrobat's own or an external editor is used in the Javascript tab of the Preferences. There you also specify the application to act as external editor.
I have a set of html files needed to be modified locally. So I found an easy way to do that: write javascript/css, attach them into existing html, run them in a web browser, and save the results back to html files. The problem is I have a very large set of html files to be processed. So I need an automation.
I would love to know how this task should be addressed. I found that there is an automated testing tool like Watir, but still wonder if this is the right option for the problem.
Specifically I use jQuery to easily parse and modify html pages dynamically. This is the reason I don't want to do it otherwise with, for example, Java which lacks support of good libraries for html parsing.
A "headless browser", like Phantom JS may help you.
Notepad++ does auto-complete for html and also for JavaScript. but the auto-completion depends on file extension.html file supports completion for html only. Is there a way to enable auto-completion for javascript in the script tag of an html file? I mean, other than copying the auto-completion keyword list from "javascript.xml" to "html.xml" files...
You would either need to
write your own lexer plugin (may possibly have an issue of conflicting with the internal HTML lexer), or
modify the source and compile your own notepad++/Scilexer.dll
Both are not quick undertakings.
I was faced with the same dilemma. For me, The most simple way to get the functionality you desire was to switch to an editor that already does this by default called Brackets. It is specifically designed for web development and is completely free and lightweight.
Another way to do is to create 2 files and code
JavaScript in the second one (but never save it)
HTML in the first one (and copy/paste your Javascript between <script> </script> balises)
Best way to work (for security) is to use 2 separated files : your JavaScript could be protected when the user try show source-code in his browser.
by the way, Notepad++ is a very fast and smart editor, you could just add complements to it like JSLint, emmet, nppFTP, indent by fold... and change it theme by a dark one (Obsidian) : it would be enough for small projects coding. ;)
I'm writing a web-app using Python and Pylons. I need a textbox that is rich (ie, provides the ability to bold/underline/add bullets..etc...). Does anyone know a library or widget I can use?
It doesn't have to be Python/Pylons specific, as it can be a Javascript implementation as well.
Thanks!
There are several very mature javascript implementations that are server-framework agnostic:
http://www.fckeditor.net/
TinyMCE
WMD (used by SO)
The wikipedia article on Free HTML editors has a good overview, though note that not all are for application embedding.
ExtJS's HtmlEditor was the best I found (license issues aside):
http://extjs.com/deploy/dev/docs/?class=Ext.form.HtmlEditor
ExtJS is a bit heavy-weight, but that HtmlEditor was the most responsive and best-looking out of the box that I found. It's worth running the output through HTMLTidy, which there are python libraries for.
webkit-gtk is getting very stable, and i believe has python bindings now so technically you could use that (then your text editor merely needs to be <body contenteditable></body> and you'd be done. Unfortunately i'm not sure how complete its bindings are at present