Need to be able to insert HTML into my forum topics

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hello-
I realized just now that I originally asked this at the very bottom of a 2 year old topic, so I thought maybe better if I create a new one.

I understand why the HTML editor that was included in the forum had problems and was removed from subsequent releases, but I'm wondering if somebody has worked on this during the past 2 years.

My forum will not be allowing comments of customers or visitors, so I do not have to worry about the potential security risks associated with allowing strangers to possibly inject malicious code into the database, nor do I have to worry about improperly formatted HTML being inserted by novice coders.

It is essential that my forum posts include HTML and image references, and without a better GUI admin interface for creating and editing posts, it will make it necessary for me to manually insert the data into the database.

Has anyone addressed this yet?

EDIT:

In order to move forward with progress, I created a new forum topic with some bogus text, and then inserted my content directly into the database record, replacing the bogus text. When viewed in a browser, the embedded HTML doesn't render and you just see the raw HTML code.

Remember, I'm new to this...so maybe my methods seem a bit wacky..

EDITED:

I figured that the _ForumPost.cshtml would be the place to look, and I found this on line 87:

                @Html.Raw(@Model.FormattedText)


I'm a total novice at ASP.NET/C# but it looks to me like it's being encoded as non-HTML and I want the exact opposite.

I tried just this:
@Model.FormattedText

..and it displayed character encoded text with " &lt "  instead of a " < " for example, so I at least know I'm editing the correct piece of code, but it's just not what I'm looking for. I need for the HTML content in the database field to actually render on the page at real-time.

Any guidance would be very much appreciated.

UPDATE:

If somebody knows how to embed a TinyMCE or CKEditor into the forum topic editor, that would be awesome...and I do have a small development budget..

Also..I noticed that the TinyMCE is actually bundled into the site already, so I'm hoping it won't be too hard to integrate it into the forum topic editing page...?


(taps microphone) hello? testing...is this thing on??

Hello (Hello) ...Echo (Echo)...4 days, no response...seriously?


EDITED AGAIN:

OK...I tried this:
            @Html.Raw(Server.HtmlDecode(Model.FormattedText))

...and it worked, but I'd still be very interested in how to go about integrating the TinyMCE editor into my site if anybody has a clue. It will be extremely time consuming for me to have to manually insert/update data in my database every time I want to edit or add a new forum topic.

Thanks,
Steve
11 years ago
Almost a week and no replies....could this really be so undesireable a feature or complex a task that nobody else has tackled it?
11 years ago
3 weeks and no replies...kinda rediculous, huh?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.