Skip to main content
Inspiring
March 25, 2007
Question

Using TINYMCE

  • March 25, 2007
  • 7 replies
  • 7234 views
I am using tinyMCe with my textareas, they are working fine and in am entering the message as i like the way formatted, When they appear on the below page. It shows the HTML tags and didi not display my Formatting, The way it comes out is like this:

<h1>I think sql server 2005 is stable than others.</h1><p style="background-color: #ff6600"><img src="../tinyMCE/plugins/emotions/images/smiley-undecided.gif" border="0" alt="Undecided" title="Undecided" /> </p>

Well I hope this need to be resolved...

I also try surrounding your output with
<cfcontent type="text/html">

It is just making my template look bad and not shown the way it should be shown as formatted.
.

This probably didnt worked out...
    This topic has been closed for replies.

    7 replies

    Inspiring
    April 18, 2007
    gavy81 wrote:
    > guys i have recieved no luck till yet
    >
    > plz help

    how many times have we asked you to post your code? and you still
    haven't done that!!!

    without seeing your code:
    a) for tinymce initialization
    b) for the form that uses tinymce editor
    c) for storing the input in the db
    d) for retrieving data from the db
    e) for html/cfml to display data on the page

    it is pretty much just blind guessing what is wrong...

    since i do not see anyone else chiming in with the same problem, i
    suspect the reason for your problem is elsewhere in your code, not with
    tinymce... i have been using tinymce for over 2 years now and never had
    a problem with it...


    --
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com
    Participating Frequently
    November 19, 2007
    Hi Guys!

    I had this issue (only happened using IE browsers).

    The problem is that in your code for the INPUT Type="submit" name="submit".....

    Try changing the name="submit" to name="submitthis" OR anything OTHER THAN submit as the name.
    gavy81Author
    Inspiring
    April 17, 2007
    guys i have recieved no luck till yet

    plz help
    Inspiring
    March 27, 2007
    yes, i tend to agree with you: he must have typed actual html code in
    the textarea, and thus tinymce has saved it as it has been typed,
    escaping all html tags...

    i have been using tinymce for about 3 years now, and never had this sort
    of problem... but then i never typed html code into it, either :)

    --
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com
    gavy81Author
    Inspiring
    March 27, 2007
    As the output shows the tags directly on the page and is not processing them as html, it leads me to believe that this is the case.

    ok now when i enter the text as

    Hello how are you, in the bigger size say h1 usingthe tinymce option.

    it shows as

    <h1> hello how are you</h1>

    as you talked about the datbase, it stores the value as below in database field.

    <h1> hello how are you</h1>

    I want to show like this:

    http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=20556#p20556

    but the problem is it is not showing as adove.

    it rather shows the html tags

    as also i am outputting the PostMesage value in any textarea or something, using no such function like trim etc,

    Participating Frequently
    March 28, 2007
    quote:

    Originally posted by: gavy81
    as also i am outputting the PostMesage value in any textarea or something, using no such function like trim etc,


    Not sure I understand that last sentence, are you saying you ARE displaying the output in a textarea or not? If its in a textarea then that's your problem as the textarea tag doesn't interpret html.

    If it isn't in a text area, (ie. a div) then it certainly should display correctly provided the data is stored correctly.

    If you do a cfdump of the query (qry_ReplyPosts?) what does the stored text look like?

    <cfdump var="#qry_ReplyPosts#">


    March 26, 2007
    The problem is probably an easy one to solve.

    In TinyMCE, if you just go ahead and type in xhtml code into the WYSIWYG text area, TinyMCE will automatically escape the characters you have typed in.

    If you want to check if these have been escaped or not, on TinyMCE there is a "html" button. Click that and it shall show the raw source code of that WYSIWYG - check in there to see if the angle brackets ( e.g. < and > ) are actually coming out as escaped versions or not ( eg &gt; and NOT > as desired )

    As the output shows the tags directly on the page and is not processing them as html, it leads me to believe that this is the case.

    The reason TinyMCE escapes characters is because it is meant for people without html knowledge and will thus prevent as many problems with this as possible.

    Not sure why this is a Coldfusion question though as it relates to it in no way whatsoever.

    Another tip is to look in the database itself and see how it looks stored in there.

    Cheers.
    Participating Frequently
    March 26, 2007
    Is your output inside a textarea?

    Try placing it in a div instead of a textarea as textarea controls don't display formatted html.
    gavy81Author
    Inspiring
    March 26, 2007
    Well the code is below which is troubling me..

    I have configured the tinymce with the following script as it is appearing:


    Inspiring
    March 26, 2007
    how do you output the info? can you post the code?

    --

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    Inspiring
    March 25, 2007
    tinyMCE does not like poorly formated code. Review your code for correct formatting, mabe use http://validator.w3.org/ to validate it.
    gavy81Author
    Inspiring
    March 26, 2007
    quote:

    Originally posted by: Neo Rye
    tinyMCE does not like poorly formated code. Review your code for correct formatting, mabe use http://validator.w3.org/ to validate it.


    Well I cheked this, but did not find any relevant information, well what is it and how can i find the specific info about the tinyMCE formatting