Hi everyone I am trying use tinymce-rails and and also have an upload form. This works really well since I can call the images anywhere. Just about everything is working great. The images upload, the tinymce styles stuff.
Now the weird thing is tinymce keeps adjusting the file paths to add "../../../" and this breaks the photos when editing the text. It would actually work fine if it would just go up one more "../" count on the edit page, the pathing does work on the show page.
Does anyone have any direction they can give me?
As I can't know the source of this, I can provide a workaround.
In your model, let's call it Post, you might need to replace stuff to the field containing the html, let's call it body:
before_save {
body.gsub!(/(\.\.\/)+/,"..\/")
}
Related
I am writing a Program in Rub On Rails 4.x and I have to take PDF files with defined fields that can be filled out, fill in data from a form submission(This part is DONE!), and lastly allow the user to modify the saved PDF file on the server and overwrite said PDF after making their modifications.
Like I said I have already gotten the PDF files filled out with what has been submitted in the form through pdftk . What I now need to do is provide a server side editing capability to the said PDF files on server generated from the first step of the process.
I have seen similar posts but none wanting to do the same thing I do. If I am wrong links would be great. Thanks in advance for all your help!
After lots of digging and research here is what I have found to be the facts surrounding this issue and implementing a program to allow embedding the PDF file, editing it, and saving it back to the server. This process would be great however from what I can tell there is nothing out there that really does this for Ruby On Rails. To quote #Nick Veys
Seems like you need to find a Javascript PDF editor you can load your PDF into, allow the user to modify it, and ultimately submit it back to the server. Seems like they exist, here's one for ASP projects
You are correct but still wrong in the sense that yes there is one for ASP projects however that is Microsoft Based, yes I know that it can run on Linux environments through Mono. However to the point it would appear in this instance that a Ruby On Rails specific solution is indeed needed.
The solution that we have come up with is as follows
1. Use a PDF editing package in the linux repositories like PDFtk
2. You then render a page with the PDF embeded on one side and a form representing the live fields in the PDF to take input.
3. Once submitted you use PDFtk to write the values into a new template PDF file and overwrite what was previously stored.
This requires a few additional steps to process the data than I really care for myself. However it is the best solution that our team could come up with, without bleeding the project budget dry for just 1 piece of functionality.
I hope this helps anyone else looking to do the same thing in Ruby On Rails.
I have done something like this using my company's .NET product. It can also be done using its Java version too.
http://www.gnostice.com/nl_article.asp?id=255&t=Save_Form_Submit_Data_Back_To_Original_PDF_Document_In_NET
I'm having all kinds of trouble getting CKEditor working in a Rails app.
It always makes a request for skin.js which doesn't even exist in the stock package.
Whether or not it displays the groups I specify seems completely up to chance. Some of them work (like Clipboard), others don't (Like Document).
All the icons are messed up. They display on the wrong buttons. Sometimes the same icon will show up on two separate buttons.
I have no idea what's going on. I didn't customize anything. I got the 4.4.0 download straight from the homepage. Standard package.
Any thoughts???
Thanks!
This problem usually occurs when it clashes with any other js script in the project. try downloading the code and run it in a separate project, if it works fine there , this means you have some other js in your code conflicting with the ckeditor script and usually this is the inline js which causes problem.
This is my first go-round with Contour and I really like it! I am stuck on one thing and hoping someone out there has some insight.
I have a simple 4 field form, nothing required, no rules...one of the fields is a file upload field. It renders and works correctly on the form, but when I recieve the email with the form values, it does not include a link to the file, or a file attachment. The attachment is also not shown in the "Entries" tab. I tried installing Contrib which seems to have more support for attachments, but I still did not get any mention of the uploaded file in my email.
I am wondering if there is anything I have to do in the config, or similar to allow sending attachments.
I am running Umbraco v6.0.6 and Contour 3.0.14, Contrib is currently uninstalled. I am adding the Razor Macro the page, not the UserControl.
Thanks
Going to answer my own question here in case someone else runs up against this.
Out of desperation I decided to just start trying anything I could think of, so I tried adding the Contour form to my page as a UserControl (despite what I had read) instead of as a Macro, when I did that, I started receiving the attachment link text in my email so I re-installed Contrib and boom, attachments are on the email now.
SO, in summary, you need Contour (obviously), need the Contour Contrib package, and you need to add the macro as a user control and not as razor in order to send attachments
I have a problem to make Simple Image Gallery to work in Joomla 3. It doesn't display any pictures, actually it doesn't even care about them.
I have this pages:
http://utsnorthsath.kangoowebs.com/gallery/images/34-short-course-cross-country
It looks like {gallery} tag is not recognized/parse and no gallery is displayed. Does this module SIG require any additional action after installing to tell Joomla that {gallery} tag should be parsed now?
I don't get any error message, just the content is not parsed.
Thank you for any help.
Don't want to teach you to suck eggs but when I find {plugincodes} rendered as is, it either means you haven't used the syntax correctly or you haven't enabled the plugin in Plugin Manager.
One other thing which may be affecting the plugin is that you load jquery before Mootools.
Best practice is to load these the other way around.
You could look for an excellent plugin called JQuery Easy which should fix that issue and possibly the Gallery issue too, if the above isn't it.
I'm working on my first symfony project (it's great !), i am using the sfWidgetFormTextareaTinyMCE widget for a form in the backend (to display the WYSIWYG).
It works fine, but at the frontend, instead of showing me the formated text, i have the strong,p,... tags in the text.
Same if i paste a youtube code for example.
Does someone knows how i could solve this issue ?
Thanks in advance.
Julien
so these strongs and p's... did you create them in WYSIWYG mode on the back end or did you try and paste actual code into the editor? To cut and paste code you need to be in source mode. Other wise you need to use the controls for bold on the tool bar and and line breaks for the p's.
If you used source mode, make sure strong and p are configured to be allowed by tinyMCE - i thought they were by default, but maybe not.
Thank's for your answer.
Actually i justed used the $object->getRaw()->getValue() method instead of $object->getValue() and i got the "raw" result.
In fact it was properly saved in the database, i just didn't knew how to avoid the auto escaping.