Jump to content

How to edit the HTML source of a CMS generated page


Recommended Posts

Hi there,
 
I'm trying to create a new page using CMS tools, and I'd like to use dojo library. I understand I can edit the Header.tpl to add the dojo library import codes, but when I use TinyMCE editor to edit HTML source code, certain dojo specific tags got automatically removed every time I commit the changes. How can I edit the source code of the CMS generated page? or how do I add a new page in PS manually but using PS theme and layout?

Thanks very much!

Link to comment
Share on other sites

Hi,

 

I don't think that this should be a problem at all, as every tinyMCE editor contains the "source code" button, which allows you to edit the content of the CMS page. In PS 1.6. it should be under Tools - Source Code.

Thank

But is not the case, please forgive my English is not good

for example

I enter the code

<body>
<a href="#" class="screenshot"  rel="../img/wwwbangkokledlightcom-1404299986.jpg">RICKY</a>
</body>

Will change after saving

<a href="#" class="screenshot">RICKY</a>

So not working

Link to comment
Share on other sites

Thank

But is not the case, please forgive my English is not good

for example

I enter the code

<body>
<a href="#" class="screenshot"  rel="../img/wwwbangkokledlightcom-1404299986.jpg">RICKY</a>
</body>

Will change after saving

<a href="#" class="screenshot">RICKY</a>

So not working

That's because the editor automatically changes bad syntax to good syntax.

a) You can not use body tag, as you're already in the body of the html page

B) the value of the rel attribute is invalid. Look at this http://www.w3schools.com/TAgs/att_a_rel.asp

  • Like 1
Link to comment
Share on other sites

sometimes tinymce removes also other markups, especially some of the non-default things like social widgets code etc.

in this case it's worth to extend it (tinymce) here on forum you can find several topics related to extending tinymce

Link to comment
Share on other sites

sometimes tinymce removes also other markups, especially some of the non-default things like social widgets code etc.

in this case it's worth to extend it (tinymce) here on forum you can find several topics related to extending tinymce

I follow this tutorial successfully Extended tinyMCE 
 
But tinyMCE still removes my code
 
But I enter the code in use HTMLbox v1.5.2 module 
Can work normally

Please help me. Thank you very much!

Link to comment
Share on other sites

 

I follow this tutorial successfully Extended tinyMCE 
 
But tinyMCE still removes my code
 
But I enter the code in use HTMLbox v1.5.2 module 
Can work normally

Please help me. Thank you very much!

 

 

I think that still, the problem remains the same.

HTMLbox does not have (afaik) a .js file that would correct bad syntax, it simply projects the html you put in, no matter the syntax/errors.

If you really want to paste the HTML code in - how about doing it right inside phpmyadmin?

Link to comment
Share on other sites

×
×
  • Create New...