Markdown editor in ASP.NET MVC - asp.net-mvc

I'm looking to use markdown in my website, and I'd like the editor (or something similar to) the one used here at Stackoverflow. As far as I can see, I can get this from the google code site.
What I want to know is, how do I then use this in my site? I see perl files etc included with this.
Anyone done this before, or have links to good documentation (the site of the original WMD appears to have disappeared).

Here is StackOverflows fork/branch:
https://blog.stackoverflow.com/2008/12/reverse-engineering-the-wmd-editor/
https://meta.stackexchange.com/questions/4168/can-i-use-stack-overflows-reengineered-wmd-editor

Related

How to customize guacamole login page?

good day to all,
My question is very simple, I would like to customize the guacamole logging-in page and remove the logo of guacamole the problem is I have no idea where to find the HTML file of the login page. do you have any idea how to find it and where, I am new to guacamole and the search on the internet has no clear info about it?
Guacamole front-end runs on AngularJS (Angular 1 I think some people call it). You will probably need some understanding of the framework to edit it.
I can give you where to start, but not really a full guide(not the best with Angular).
Look inside the /guacamole/src/main/frontend/src/app directory inside your project (here is the link on Github), you will find where the general structure of the front-end is. The modules, directives and all that.
Specifically for the login page, go to your /guacamole/src/main/frontend/src/app/login/templates/login.html file inside your project. (You can find it here) on Github.
Hope this helped and the best of luc :)
There is a popular guacamole-client replacer called guacamole-lite which allows you to integrate guacamole easily into your frontend.
I also wrote a C# version of that replacer with ready to use docker image. Check it out: guacamole-sharp

Make swagger UI look as it does on their website

Recently got swagger setup for use internally with my team. Functionality exists fine but the look and feel leaves more to be desired. I see there are a few questions on here about themes, but none really have answers other than it isn't really possible. What we have looks like classic swagger:
It's fine, but isn't that pretty. Then you look # the swagger editor and it looks like:
Which imo is MUCH nicer and the forms are bootstrapy instead of boxy. Was wondering if it's possible to get ours to look like this. What files would need to be modified? styles.css?
I don't know much details. But they are different UI component. Don't think just extracting css will do the job.
I believe you are referring to the Swagger UI vs the Swagger Editor
You can still load the spec in the editor and click on the < (located in the middle bar) to hide the editor text. That might partially do you job! :-)

Making a basic SO-like WYSIWYG editor in Rails

I am relatively new to Rails, having recently completed Hartl's Rails Tutorial, and am now embarking on my first full fledged project. What I am interested in adding to my web app is something similar to the text input feature in SO, where you could type, and see directly how your text will turn out. After some digging around on SO, I have decided on using the gem bluecloth, which is Markdown implemented in Ruby, but now have the following questions:
I am unsure about how to tie what bluecloth outputs to the form_for helper. My understanding was that you could convert to strings via the function html = BlueCloth.new(str).to_html(), but I am unsure what to do when you have a text field as part of form_for, where I should plug in the bluecloth part? In other words, I am still a bit confused about the magic of typing in one box and seeing the item show elsewhere on the page.
Are the WMD bar button items and functions included Markdown editors (such as bluecloth), or would this be something I have to build manually? If so, how would I get something like the bold button to show "** **" in the editor as you type?
Thanks for your help!
As comments have noted, Markdown is a markup language like HTML, so its not easy to do WYSIWYG.
There are probably two approaches to getting this kind of functionality.
Server side
Post your markdown text to a server and get the server to return HTML. I've done this a lot in Python, but for Ruby this SO answer suggests maruku. The disadvantage of this approach is that it requires a server request every time you want to view the preview, and then some way to integrate that back into your UI without disrupting the user. Stackoverflow uses this approach with the WMD editor and some C# on the server.
Client side
Another option is to use a client side library to take your markdown "code" and generate html which you can then integrate into your page using javascript. An example of this is dillinger. This uses a textarea and something like showdown to render the HTML in the browser. I'm taking this approach one step further in a WYSIWYG Markdown editor I'm developing called demarcate.js
Or... ditch Markdown
The comments have already suggested alternative WYSIWYG editors... most of these are not markdown editors but rich text editors which produce HTML at the end. TinyMCE and wysihtml5 are good options and I've also used CKeditor before with some success - it has a cool "in-place" feature in the latest version which inspired my Markdown editor above.

How can I find where actually is the theme file?

I am new to Symfony and I need to work to a large project with many themes to modify them. How can I find where actually is the theme file in which module, just looking at the HTML browser output? Or do I need to look somewhere else, routing for example?
What you want to do is use the Web Debug Toolbar.
Once you have that running on the page, using appname_dev.php, simple click the view link and it will show you which templates have been used. If you need to know which layout to use then use logs link, click none the sfPHPView.

docbook wysiwyg editor for the web

Is there any ready-to-go docbook editor for web applications out there?
I'm thinking of something like FCKeditor or TinyMCE that returns a docbook xml code back to the web application. I am aware that FCKeditor is customizable to do this, but I have not heard of anyone who did this.
Maybe the Xopus web based XML editor does the trick?
http://xopus.com/xopus-web-based-wysiwyg-xml-editor.html
It has support for Dita and Docbook.
I think you are looking for an online docbook IDE or an editor that automates a lot of the XML rigmarole associated with the docbook format.
You could try the oXygen editor http://www.oxygenxml.com/xml_editor/docbook_editor.html . Their trial is 30 days to see if you like it.
Hopefully that gives you some new google terms as well, but that is all I have.
(If, in addition to a good tool for what you need, you find a nice graphical validator. I would love to see something that works better for my work flow than command line jing.)
Docbook is one of the file formats supported for single-source editing in Open/ Libreoffice.
Note that there can be no such thing as a WYSIWYG editor for a presentation-neutral document representation: to be WYSIWYG, things like page dimensions and margins need to be fixed.

Resources