2
votes

Why is SharePoint so shit?

Firstly the content editor webpart gives you a nice message "Warning: The HTML source you entered might have been modified." when you insert some HTML via the "Edit HTML source".

And what's even worse, is that what you are editing is generated HTML, not the source HTML.

Lets say you have some markup that is modified and turned into a slider by some jQuery linked to in the master page. jQuery plugins generally add classes, add extra HTML around the original markup to achieve the desired functionality.

With the SharePoint 2010 page editors, you are presented with the markup AFTER it has been modified by JavaScript. What kind of idiotic approach is that??

I could have my source HTML in separate files, and simply link to them from each content editor webpart, but that makes maintaining pages a pain in the ass.

Is there a setting I'm missing somewhere? I assume there's a setting somewhere similar to the following

SPActLikeARetard = True

How can I change this to False?

1
Tell me about it - however, use the alternative - whatever it is you are rendering (Script, HTML, etc.) simply put it in a text file and point the CEWP part to it. Problem solved.David Sterling
Problem solved but when your talking about thousands of pages across multiple sites, I'd much rather be able to just go Edit Page, grab the source and do my edits in Dreamweaver or where ever. With the text file approach I'm not going to remember what the file is called, so I'd need to go Edit page, edit webpart, grab URL of file, download, edit, upload etc. Just a lot more cumbersome.Fergal
Well, true there...they tried with the Rich text pages but...however, benefit is reuse - without cut & paste.David Sterling

1 Answers

1
votes

Another option is to the HTML Form Web Part (in the Forms category). This can be used to connect to other web parts, but more simply it can used to edit JavaScript directly in the web part. It seems that the rules for Content Editor Web Parts do not apply to the HTML Form Web Parts so it allows more flexibility.

Not the best, but will work.

It would be nice to have a markup editor web part which has not inteactive design besides controlling the markup that gets output by the webpart.