exhumed
  •  exhumed
  • 54.4% (Neutral)
  • YAF Camper Topic Starter
2014-04-16T09:04:59Z
Hi All,

I am creating a site based around the yaf sample web application, and I need to include an editor for users to submit feedback on a single page.

Rather than grab the CKEditor.NET assembly and use it as outlined here  I was swondering if it would be easy to create an instance of the standard yafEditor on my page using some javascript functions?

If I included the following in my aspx page how easy if at all possible is it to hook up the yafEditor to it?

Quote:

<div class="EditorDiv" ID="EditorDiv">
<textarea id="YafTextEditor" cols="100" rows="15" class="YafTextEditor"></textarea>
</div>



I'm guessing I'd have to use something like <%=YafTextEditor.ClientId%> in the javascript as the control id will obviously be different when the page is rendered.

Any help or advice is appreciated

Thanks

Exhumed
Sponsor
s3b4k
  •  s3b4k
  • 59.6% (Neutral)
  • YAF Camper
2014-05-23T22:42:53Z
actually I tried the exact same thing but failed(was getting a bunch of javascript errors). Look at the implementation of forum/controls/postmessage.ascx you will see that you need to use the class forumeditor

Quote:

// get the forum editor based on the settings
string editorId = this.Get<YafBoardSettings>().ForumEditor;

if (this.Get<YafBoardSettings>().AllowUsersTextEditor)
{
// Text editor
editorId = !string.IsNullOrEmpty(this.PageContext.TextEditor)
? this.PageContext.TextEditor
: this.Get<YafBoardSettings>().ForumEditor;
}

// Check if Editor exists, if not fallback to default editorid=1
this._forumEditor = this.Get<IModuleManager<ForumEditor>>().GetBy(editorId, false)
?? this.Get<IModuleManager<ForumEditor>>().GetBy("1");

// Override Editor when mobile device with default Yaf BBCode Editor
if (this.PageContext.IsMobileDevice)
{
this._forumEditor = this.Get<IModuleManager<ForumEditor>>().GetBy("1");
}

this.EditorLine.Controls.Add(this._forumEditor);


the signature
robert82
2016-05-27T10:45:14Z
Did you find a solution or someone else?
Would like to do the same
tha_watcha
2016-05-31T15:19:47Z
Originally Posted by: robert82 

Did you find a solution or someone else?
Would like to do the same



No that is not possible. The editor can onyl work inside yaf.
UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved