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.
Related
I am trying to generate specflow mstestexecution report with the screenshots path mentioned as link. I made use of Console.Writeline() to mention the screenshots path but its getting dispalyed as text in the report. Please provide your inputs on the same.
The HTML report sees everything as plain text even if you use HTML tags. This is by design. You can change the behaviour of specflow.exe yourself, it is an open source project on GitHub.
When you don't want to dive to deep into that, you need a more ugly work around: You could consider to tag your links with another token (like {img} instead of ) and than search and replace in the .html file for all {img} to for example.
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!(/(\.\.\/)+/,"..\/")
}
I am using Parse SDK as a backend and when application loading data from server i see label "Loading". But my app using another language and i wanna translate it. How can i fix it?
Image here
I am tried to change simulator language and and changing value of Localization native development region key in plist.
Anyone had this problem? I think there is very simple answer, but i cannot find it. :)
Thank you for help!
So after a long search, i discovered that you should create a file named "ParseUI.strings" in order to change UI elements like "Loading.." as you mentioned. You can see the file in the image below. You should use at least ParseUI framework 1.1.6 for this method.
After you create a file and named it as "ParseUI.strings" you can change UI elements which parse provides us. You can see which strings are editable here.
In your example you want to change "Loading..." string, so all you have to do is enter the code in your ParseUI.strings file.
"Loading..." = "Whatever thing you want to say...";
Thats it, it worked for me.
I want my application to be able to set IE, Firefox, Chrome & Operas homepages when a button is pressed. I understand IEs homepage is set in the registry, which I understand how to change, but can anyone give me any help with the others? Thanks
Chrome stores the homepage in a file called 'Preferences'. On Windows XP, this is located at;
C:\Documents and Settings\USERNAME\Local Settings\Application
Data\Google\Chrome\User Data\Default
On Vista+, it's located at;
C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default
This file is JSON format, and so it can be opened and viewed as plain text. In order to change the homepage, you'd need to load the JSON from this file, and change the homepage field value. You may also need to change the homepage_changed field value in order for it to stick. Using something like SuperObject to change the field would be an easy solution (if I get time, I'll write up some example code later).
Firefox uses a pref.js file to store it's settings, and realistically, a way of changing this would be to load this file, find the something that's along the lines of;
user_pref("browser.startup.homepage", "[URL]");
...and edit it as appropriate before saving the file. This should be a simple task using some simple find-and-replace code. I'd strongly advise that you use a pos() function though, as it could be that the end-user has already got their own custom homepage set and so searching for a preset string (e.g. [URL]) may not work, and certainly wouldn't be reliable.
A quick search hasn't given me enough information about Opera to provide a solution, but I'll keep looking and respond if I do find such a way.
Note that none of these methods have been tested and are merely provided based upon some very quick research.
My clients can enter text into textarea and have the option to use the markdown or textile filters for each textarea.
With some models (articles, newsletter, etc) they can upload images to associate with the model, which are displayed in a column next to the text of the text.
This worked fine for a while, but they have now told me that the want the ability to put the images INSIDE the text a specific positions.
What is the best way to go about this? I suppose I may have to use a wysiwyg for this, but would rather not. And how would this work for images which are not yet on the server, etc?
There are different directions you could go to:
Follow the path of Confluence, which released in their new version 4.0 a rewritten WYSIWYG editor, that stores as source XHTML, not any more wiki markup.
Leads to an update of all pages when migrating.
Was pretty difficult to implement. I do not know if they use any more the TinyMCE editor of previous versions.
Follow the format of markdown how to include images in your source format. So by typing: This is my text. !image.png! The inline image shows ..., you will have a format that is understandable.
You have to expand the interpretation, so that the !<filename>! will be mapped that is stored locally anyway.
You have to add clear-up dialogs for the images that are yet not known, so doing bulk uploads ...
You may provide a drag area on your view, that then shows the filename and gives examples how to include that inside the text area.
Go for something in between, by allowing users to drag images inside the editor. There are plugins written in Javascript that allow you to do that, e.g. UI Draggable for jquery
I have no idea how to integrate that image inside the text editor. Overlay?
So the second one is the easiest, and the user knows how to do it. If they only decide that this is the solution they want to have :-)
I think I'm going to use a combination of #2 above, and the Liquid templating engine.