Try to display code in the WYSIWYG

8 posts by 3 authors in: Forums > CMS Builder
Last Post: May 16, 2011   (RSS)

Re: [incube] Try to display code in the WYSIWYG

By gkornbluth - May 14, 2011 - edited: May 14, 2011

Hi incube,

Not the perfect solution, but <textarea> your code...</textarea> shows the code as code.

Try this in the HTML of the WYSIWYG editor as an example:

<p>Here's some code</p>
<p><br /><textarea style="width: 162px; height: 24px;"><br> < span class="blue"></textarea></p>
<p><br />And Here's some more text after the code block. </p>


You can re-size the code block by dragging it's borders or if that fails, adjust the height and width of the style in the html.

Hope that helps.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Try to display code in the WYSIWYG

By incube - May 14, 2011

Naaaa doesn't work.
You can see what I mean there:
http://beta.rdsign.net/code/article_6
It work for light html. But as soon as I put my complex structure it strips all my code and doesn't render the good thing. I should maybe use a Textbox instead and put my html inside it.

Re: [incube] Try to display code in the WYSIWYG

By gkornbluth - May 14, 2011

Sorry,

I don't have a better idea.

Can you do something with popups or links to code pages?

Please post your solution.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [incube] Try to display code in the WYSIWYG

By incube - May 14, 2011

I tried with a textbox. Doesn't work either.
I really need a way that I can put anything between a tag that will not be rendered or alter in any ways.

Re: [gkornbluth] Try to display code in the WYSIWYG

By incube - May 14, 2011

Well I could certainly use something like a lightbox. But I will need to put the code in the wysiwyg too. So the code will be alter and rendered and will get the same result I guess.

There is so much blog with a Code tag that work. There is certainly a way to do it. CMS Builder should care about people who want to create a blog with there great CMS.

Re: [incube] Try to display code in the WYSIWYG

By Jason - May 16, 2011

Hi,

In the wysiwyg editor, in the drop down box where you see "Paragraph" there's an option for "Preformatted".

Try this and let us know if that works for you.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Try to display code in the WYSIWYG

By incube - May 16, 2011

Nice it's working great.
I found another way too.
In html I pasted :
<pre><code class="prettyprint">short text</code></pre>
I go back in normal view and replace the short text with my html, javascript or css code.
It's a bit painfull but it did the job.
Your method is simplier than mine. Thank you.