newism / nsm.tiny_mce.ee_addon

Other
6 stars 3 forks source link

Respecting EE tags in TinyMCE #13

Closed atomworks closed 12 years ago

atomworks commented 12 years ago

Is there anyway to get this add-on to respect EE tags that are used in the source?

Basically I've built a site without TinyMCE, now it's switched on it's breaking a lot of things. For example a lot of images when the code was entered in the normal textarea field used the {site_url} or (path='foo/bar'} tags, when this is edited it's being picked apart so a simple load and save of a page by the end user is breaking content, which is frustrating all round!

One such example would be a direct path to an image being "{site_url}/images/logo.jpg" become just "/images/logo.jpg"... which if the site URL is example.com/foobar/ then it's breaking it.

Hope there's a way! Cheers.

leevigraham commented 12 years ago

Try wrapping your template code in:{exp:allow_eecode} … {/exp:allow_eecode} http://expressionengine.com/downloads/details/allow_ee_code. Also check the source to see if the curly braces are being encoded.

atomworks commented 12 years ago

Hi Leevi,

It's the WYSIWYG itself that was eating things, when switching to source view you can see that things go missing. The tags stay and work just fine if I'm just using the textarea field with code in. I'm sure I've not had this issue before with it!

leevigraham commented 12 years ago

Hmm, You could try updating the version of TInyMCE yourself. That may fix the issue otherwise you'll need to post on the TinyMCE blog.