While perusing through the various helpers for MvcContrib's FluentHtml project (and loving the composability of it all), I realized that there was no option for creating anchor tags that go to actions, like that of Html.ActionLink(...).
I can't understand why something like this wouldn't have already been implemented. I'd love to do something like this:
<div>
#(this.ActionLink("Go Here!", "AwesomeAction", "Awesome")
.Class("amazing")
.Attr("awesome", true))
</div>
I understand this is more of a discussion, which I also understand is frowned upon as SE. In light of that, could someone help me understand how something like this might be created in the FluentHtml project? If it does indeed work, I would love to spruce it up and submit it as a patch.
Thanks! Feedback is welcome!
Related
I want to display text like below, how can I store it in database, should I have put by hand like <p>, <br /> right? It will be take a lot of time, there are another way to do that, thank you!
Tess: Thank you.
Ravi: Are you doing anything special?
Tess: Well, I’m going out for dinner with some friends tonight and then we might go to a club. I’m not really sure.
Ravi: Sounds good. Where are you going to eat? Is it somewhere a bit special or …
You can use CKEditor for this. It will give you content in HTML format. You just need to write as a document editor. for example in the StackOverflow question and answer section, you are can design the document as bold, italic, hyperlink, etc.
There are lots of WYSIWYG editors, for example, TinyMCE, Summernote, etc.
The design of comments of Blogger set the comments box at the end of the comments lists. I think its great, unless there are too many comments. So, I was looking for a way to put the comment box first, I think its better for UX!
Can you help me, please?
PD: I know Google+ comments has this option, but I prefer to keep on my Blogger account! In fact, they (Blogger Help Forum) recomended me with you!
This is what I would like to do:
Go to Theme > Edit HTML, search for <b:includable id='threadedComments' var='post'> and move the block within <p class='comment-footer'> before <div class='comments-content'> like the following
i'm trying to figure out how to most elegantly integrate something like PHP's nl2br() function into a current project done with JSF2/Spring. I could easily create getters using something like return text.replaceAll("\n","<br/>"); in my model classes, however that does seem like putting view related code where it does not belong. I have the same feeling about storing actual html content in my database.
I guess the cleanest solution would be using tags/EL for this, however i couldn't find something that seemed to do just that. How would you guys implement something like this? Thank you in advance, any hints are highly appreciated!
Use either CSS, assuming that the text doesn't contain any HTML
<div style="white-space: pre">#{bean.text}</div>
Or create a custom EL function and then display it unescaped (Facelets implicitly escapes HTML)
<div><h:outputText value="#{my:nl2br(bean.text)}" escape="false" /></div>
You should only make absolutely sure that it's free of XSS.
Well, in the first place JSF is a Web UI framework. So, anything that you expect to output to the user will end as HTML (with the only exception of javascript, though). So, I don't find it a grave violation of MVC (if any at all). Maybe you could even push the envelope and directly use <br/> inside the text, instead of replacing \n
In a more general sense, if you have different lines/paragraphs in your text, the more flexible/standard solution would be break your text in the different elements and let your presentation logic handle it. So, instead of a properties with
presentationPage.introductionText=Ipse Lorum ...sum.\nVini vidi vinci.
You would end with
presentationPage.introductionText.par1=Ipse Lorum ...sum.
presentationPage.introductionText.par2=vini vidi vinci.
I asked this question at jquery forum cf: my question, but was asked to come here and look for Oleg.
I've done a lot of research online and tested a bunch of code either mine or from the web, but so far have had no luck. I keep on reading that I need to use the oneditfunc function. As you see in my question at the jquery forum, I added those action buttons in gridComplete. Where do I declare and define the oneditfunc function?
The example at http://www.ok-soft-gmbh.com/jqGrid/ActionButtons.htm does look like what I am looking for, but I can't use the pre-defined 'actions' formatter, I have to use buttons which bear the texts Edit, Save and Cancel.
There is an example at http://www.trirand.com/blog/jqgrid/jqgrid.html# under Row Editing (new) > Custom Edit, which I followed to create mine you've seen in my original question at jquery forum. Unfortunately, those buttons don't toggle.
It just doesn't make sense to display the S(ave) and C(ancel) buttons when the rows are not even in edit mode. So I do want to fix this by toggling them. Any ideas to share? I am sure this is going to help a lot of people as no working examples can be found online. Thank you!
For those who are looking to solve this problem. I have solve it and I have posted my solution at http://forum.jquery.com/topic/jqgrid-inline-editing-buttons .
I'm having problems with something which seems like an easy task, and most probably a stupid question. It will probably be my all time low experience in programming but I would really appreciate any help!
I'm using Galleriffic to display my portfolio site, and I am looking for a way to directly link to an image+description not being the first in the gallery. I would like it to link from other webpages, or from plain text/pdf documents.
In short, I would like it to link to a webaddress of slide 5 with something like:
Slide 5
but doing it this way obviously doesn't work.
Although others have tried to explain:
https://stackoverflow.com/a/7910501/1074297
jquery cycle link from external page to specific slide?
I can not seem to accomplish it, and it does not help at all that I am not a programmer.
not sure if it is too late, have been search the solutions for whole day, final found out the example 4 in the official website actually make the #link show on the address....so you can actually link the specific image ('slide'') from external page...amazing!!!!!
check this out
http://www.twospy.com/galleriffic/example-4.html#5
You can find the script after all the or just before ... and place it to your template...it works well for me, hope it helps, good luck