I'm finding that some strange things are happening with my rich text editor in Sitecore 6.6. Some users have been entering content that is breaking items. Looking at the text it seems fine but when I copy the text into notepad I can see this dot character "·"
Any time this is in the text editor clicking Show Editor does nothing and I can't view raw values either. When I click Edit Html the edit box comes up but my changes will never save, the only way I can seem to fix these pages is if I update the content straight into the database.
Is there a way I can:
Prevent these characters from getting into the database,
Update the content without having to run update statements on the database?
Thanks in advance.
Related
As per subject - I noticed that, surprisingly enough, there is no default option in the Rich Text Editor to color the text. Does anyone knows how to do it?
I searched online for the past hour or so, and found a lot of mutually contradicting material, probably dating back to older versions.
You should add your buttons under:
/sitecore/system/Settings/Html Editor Profiles/Rich Text Default/Toolbar 1
For your situation you can copy these 2 items:
/sitecore/system/Settings/Html Editor Profiles/Rich Text Full/Toolbar 2/Forecolor
/sitecore/system/Settings/Html Editor Profiles/Rich Text Full/Toolbar 2/Backcolor
under:
/sitecore/system/Settings/Html Editor Profiles/Rich Text Default/Toolbar 1
P.S. It is in core database.
What I always do to give editors access to thing like that is work with css classes. You can attach a css file to the editor in the settings. The default value for "WebStylesheet" is "/default.css".
This way editors can alter some look & feel (e.g. change color) but in the boundaries that you decide. It also helps when you need to update. If css-classes were used the update is as easy as changing the css file. Otherwise all content has to be altered.
I have a Opencart site that has free and paid code packages. I have been trying to find where in the code it is removing my line breaks. If you enter code into the text editor it saves the line breaks into the database.
When you go to edit the product it has removed all the line breaks when the page loads. Does anyone know where this can be fixed. My first thought is the WYSIWYG editor but I am lost on how to prevent this from happening.
Anyone know what file is causing this glitch.
Edit: If we cant fix the editor does anyone know what file contains the form for adding/editing a product so i can remove the id and just use the textarea
I have heard of this problem before... it is caused by ckeditor... you can remove ckeditor and paste raw html into the text area if you like... alternatively you could use a separate WYSIWYG editor such as tinymce or similar... look here for a few options http://www.1stwebdesigner.com/design/10-best-wysiwyg-text-and-html-editors-for-your-next-project/ or here Alternatives to CKEditor for WSYIWYG text area editor
Contact me if you need help installing any of them
Could someone suggest how to hide/disable HTML tab from your Rich Text Editor on sitecore?
I had a look at this, but requires a change on Sitecore core rich text XML.
Problem with this solution is we need to modify the XML for each instance and what about upgrades?
Thanks.
In the Core database (you can switch using the icon in the bottom right next to the clock) you can go to /sitecore/system/Settings/Html Editor Profiles/*profile you want*/buttons/HTML view and deny read-access on that for your users. Alternatively, at least in Sitecore 6.5, there's a profile without the HTML view. It's called Rich Text IDE. You can set the datasource field of a Rich Text field to that one, and not have the HTML view.
That's only removing the HTML option on the bottom left though, I'm not sure how to remove the Edit HTML option you have before you've opened the RTE itself (where you have Show Editor/ Suggest Fix / Edit Html). Looking at This question it might be you'll have to change the XML anyway.
The way we've got upgrades and different instances handled is by having the changed file in source control, and making sure we include it when building a deployment package.
Adding onto Trayek's great answer - you can remove access to the "Edit HTML" as outlined by Alex Shyba below:
Go to the core database, locate the field definition item:
/sitecore/system/Field types/Simple Types/Rich Text/Menu/Edit Html
On the Security Tab, click “Assign” and select the role you don’t want this option to be available to. Deny inheritance of this item or specify other security settings that make sense for your needs.
I added "Everyone" and then selected the "X" by Inheritance for Items, and the "Edit HTML" option was removed.
Taken from:
http://sitecoreblog.alexshyba.com/2009/10/quick-tip-remove-edit-html-option-for.html
I'm working on a Django app where the user uploads a space/tab/comma delimited text file. I display the text in a browser and the user can then interactively parse columns of delimited values which get highlighted with css as they change the settings. (Only a sample is displayed not the whole file!)
To highlight the selections I insert html/css code in and around the text but have to 'mark_safe' the text to get the html/css to render. I assume this opens security issues as even I, a complete noob could insert html in my input file and get it to render.
My Question:
Is there something I can use to strip html out of the text file immediately after I've uploaded it and before I render it in the browser? Would stripping '<' and '>' out be enough? What about something to disable .js if required?
I understand there are other well documented security measures I can take regarding file uploads. However I'm after a solution to my specific issue relating to me 'marking_safe' the input text I then render to the browser.
Django already has Automatic HTML escaping for this. Take a look at the link I posted in the docs. Hope this helps.
I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.