开发者

Entering custom HTML-code in EZ Publish's TinyMCE will not work

I've added the "html"-button to TinyMCE on an EZ Publish site so that the users can write custom html into the xmlblock-field. But html-code with div-, img- and other tags get stripped when the user saves. If I use the ''-tag I assume that the html-code inside will be rendered as viewable html-code on the web page, instead of actual html-content.

How can I enable html-editing in the ezoe?

This is what I'm trying:

  1. Click the html-button in TinyMCE.
  2. Write html-code:

    <div style="text-align:left; width:496px; margin-left:auto; margin-right:auto;"> <img id="Image-Maps_fottoey" src="some url.jpg" width="496" height="249" alt="" /> </div>

  3. Click "Publish". When viewing the page it has no trace of the html-code from step 2.

I've tried to add the following to my override content.ini.append.php:

[literal]
A开发者_开发问答vailableClasses[]
AvailableClasses[]=html

as per http://acidre.com/blog/ez-publish-saisir-du-contenu-directement-en-html/ but that doesn't help.

Update: It works now with the changes that I made to content.ini.append.php. This change adds "html" as a literal option and gives you a new icon in the editor, which Nicolas pointed me to (looks like a sheet of paper and is on icon row 2, first section before the Omega-icon.

When you add the html-source in the purple edit field, the editor will create links if it discovers that you've pasted inn urls. These links are blue in the editor. You must break these links with the "Break link"-icon to the far right on icon row 1. There should be no blue hyperlinks in the editor when you save. If you've managed this, the published page should display your custom html nicely :)


The usual way of enabling literal HTML in eZ Online Editor (based on TinyMCE) in eZ Publish is to uncomment the

AvailableClasses[]=html

configuration directive in an override of content.ini. A bit more of information here : http://share.ez.no/forums/setup-design/custom-tag-stop-while-running/comment64177.

Then, the literal tag should be available to editors through the literal button in TinyMCE (this button looks like a text sheet). The dropdown proposed in the pop-up menu shows 'html'.

Allowing raw html requires a few editorial guidelines and full trust in editors, but i am sure you are aware of this.

Cheers,

Nicolas

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜