I'm using asp.net and I would like to edit a newsletter using CKEditor’s inline editing capabilities and then save the newsletter to the database and send via an email.
I've seen various posts about getting the data from a single instance of the inline editor on a page.
Such as the answer by oleq to Dan Temple question on inline editing.
How do I save inline editor contents on the server?
However I would like to have a newsletter similar to the inline demo on the ckeditor site with multiple areas in different style that can be edited.
http://ckeditor.com/demo#inline
Then I guess using ajax to collate the data from each of the individual instances of the editor and save to the database.
Any help would be greatly appreciated.
Many thanks. Luke
I believe this does exactly what you are looking for:
ckeditor inline save/submit
You might need to change a few things to make it work for you. If you are writing valid HTML then I would suggest using something like Nokogiri to search and replace the contents of the page element id's instead of using regular expressions like this answer does.
I'm building a website in Drupal. I want to show some information about artistic espectacles including some pictures of it. When i define the fields to show in the corresponding view and i include the images as a content in the Fields section, the corresponding query returns the path to the image and not the image itself which is the wanted behavior. I want to know a way to make a view in Drupal which allows me show the images and not their paths. If the question isn't clear enough, please make me know and i help you to understand. Thank you.
I've had similar troubles with Views, but actually desired the behavior you are encountering. So long as you have the image's path, you can write it to the View's output wrapped in HTML <img> tags. So for example, <img src="[image path your view is outputting]" alt="">. This should display the image for you.
Depending on your Drupal version there are some great add-on modules which make Views more flexible.
This Views PHP module works for Drupal 7 (I have not personally tested) and allows you to incorporate regular PHP code into Views output.
I have used Views Custom Field extensively in Drupal 6 and it works great.
I have a requirement to print a bill from the AIR application.
Following are the constraints.
I need to print to a DotMatrix Printer.
I have a complex layout with header, footer and a datagrid with data rolling out to more that one page.
I need to have a template to which I will be passing my object.
The suffice with the usage of Jasper reports, but I have no server side support.
I tried the FlexReport, bentbit and other tools which is optimized for the DotMatrix printers.
Is there a alternative to get the above requirements done. Is there any alternative similar to that of jasper reports without going for a server.
Thanks in advance.
You don't need server to do printing, look at PrintJob class. You can print any sprites on page, and for tables there is PrintDataGrid class with paging support. So, if you can render your complex layout, you can print it. You may want to install some virtual printer for experimenting (I'm using Primo PDF, but there are others.)
Guys i used the HTML to print from the JavaScript. I made templates in HTML with delimiters matching the print layout, then i passed a Associative Array with necessary details to be printed and passed it on to HTML and printed it from there. Thanks for your replies guys..
I have XML pages with some defined structure , now using flex I want to display the content of these pages. The purpose of using Flex is to give better look.
If I can use something else which will provide a good UI to display then also its fine.
Please suggest.
you want to display the XML code??
read the xml file into a simple textarea and ready.
Damian
You could use an mx.controls.Tree and fill its dataProvider with your XML. It's an old component, sometimes buggy when you want to tweak it, but it provides a neat display of a tree. In addition you could use a textarea to display the node currently selected.
I am working on a multilingual web application. I'm wondering how do i design the best user interface that the user can localize data for various languages? for instance, in making a page which its title is different in every lang, do i put a textbox for every one? it's not a suitable way to do(in case of 10 lang, the user has 10 textbox!!! too silly)
what is your idea about this?
Edit: i have no problem with globalization in my system. in fact, i'm looking for a good way for my interface design which user can enter his data to my forms in various langs.
thanks in advance
What about only one textfield and a dropdown containing the languages. After selecting the language and filling out the textfield the field gets submitted and the chosen language disappears from the dropdown list.
the entered value and language then appears beneath the dropdown and textbox with a way to edit/delete it. this way it's always clear to the user which languages are already covered and which values are assigned to them. furthermore it's a nicer way if not all 10 languages have to be mandatorily filled in, if the user e.g. just knows english and french.
Hope you know what I mean, otherwise I'll have to create an example screenshot :-)
You could have 3 text boxes, and that's fine...get to 10, and it starts getting a bit crazy. Beyond that it starts looking pretty bad.
Maybe you could put up to say 5 text boxes up...but if it goes beyond 5 (because the user desires localization for more than 5 places) it places a single textbox with a dropdown next to it, and the dropdown would contain the current language.
Textbox would auto-populate with the current value for the language selected in the dropdown. Should work well in asp.net, and it can be done both client side, or server side on a post back pretty easily, so you don't need to do anything crazy for people not running javascript.
You have one text box.
On load you populate the text box depending on language.
The content will be populated from some kind of resource file. If there isn't much text it could even go in your config file.
Be aware of the following:
Different content length depending on language.
Right to Left alphabets screwing up your alignment
This is a classic project for using NUNIT or similar to promve that things work after new translations are added!
What language do you use in development? If this is something like PHP, then you definitely should use templates and load text strings into them from configuration files for every language. In Smarty, for example, I use configuration files for that.
Text strings for error messages or something like that could be put to files like .ini and loaded from there.
The Google Web Toolkit (GWT) demo shows the same page with versions available in English, French, Arabic and Chinese.
The GWT docs have a thorough discussion of internationalization. You could emulate their implementation.
Constants: Useful for localizing typed constant values
Messages: Useful for localizing messages requiring arguments
ConstantsWithLookup: Like Constants but with extra lookup flexibility for highly data-driven applications
Dictionary: Useful when adding a GWT module to existing localized web pages
Remember that dates and times are represented differently in different locales, if your forms use them.
The W3C also discusses Internationalization Best Practices in HTML content.
Normally, a user navigating a website will have a preference specifying the language of the whole site. I think it would be confusing to break this pattern.
So, in an intro page, or a user preferences page, allow the user to select a language; then, on the other pages, display a consistent set of controls to be able to edit the content on each page.
Are you making an administration page that allows users to change the text used in other pages in the application?
If so, you could use grid like in Zeta Resource Editor:
thumbnail http://img202.imageshack.us/img202/7813/zetaresourceeditor02.th.png
Or you could make a per-language list like in nopCommerce:
thumbnail http://img249.imageshack.us/img249/9079/nopcommerce.th.png
You can use javascipts as a resource file for your language like. language_arabic.js, language_english.js,etc.So when a use wants to see his preference language he/she has select the available languages from drop down list. Regarding this the user has to change the language settings from his/her computer. This is what I did while I was working a GIS project to customize a Geocortex IMF( http://demos.geocortex.net/imf-5.2.2/sites/demo_geocortex/jsp/launch.jsp ) site for an Arabic client.