Ajax HTML Editor - Get Markup - ajax

How can I get the HTML code (markup) that the AJAX HTMLEditor creates?
I'm trying to use the editor in order to transform rich text into a full html file. Then, the file will be used to write a SQL statement in order to insert it into a database.

You should be able to use the Content property.

Related

Get CKEditor contents without updating the textarea

Fairly new to CKEditor here. I'm aware that you need to call the updateElement() method for CKEditor to send the current editor content to the related textarea element. From there, you can call the getData() function to get the content. (Although I don't understand why there are two steps to get the editor content, instead of one.)
However, I want to get the current content directly from the editor, without changing the related textarea content. Is there a CKEditor method to achieve that, or is it a case of using jQuery to find the editor content?
The getData method will return the raw HTML from the editor.

Disable html validation and cleanup in CKEditor

We have additional placeholders, which are embeded in conent edited by CKEditor and we need to be possible to place such placeholders before and after TR-tag, so we could organize repeating of data in the table. But CKEditor probably find that is not valid HTML and take out repeater placeholders before the table.
For example I write next html in source mode:
<table><tbody>{start}<tr><td>...</td></tr>{end}</tbody></table>
I switch to html mode and back to source, now my html is treated to the next view:
<p>{start}{end}</p> <table><tbody><tr><td>...</td></tr></tbody></table>
Possibly there is a CKEditor switch to turn off all syntax cleanup or specially for tables?
Try Adding this line to Config.js file:
config.allowedContent = true;
CKEditor is not a source code editor, but a WYSIWYG editor which uses browsers' contenteditable implementations for its editing feature. Therefore, it needs to work on valid and real HTML.
Although, check the config.protectedSource setting. You'll be able to hide those {start|end} tags from parser.

How to use style sheet within a controller

I am having an application, in which I m showing some tabs through some xyz view.
if anyone click on any of the tab it will call one of the function within a controller.
This called controller function will then display some values based on the id passed through the tab.
So I want to display those values through controller as well as to apply some style to generated output using some style.css file.
Now my application is generating the output but I am unable to apply styles on it. Specially .hover style is not working.
You can include your style files into your application. For this, it is recommended to have an header.php file, and after including all needed style sheets into this file, you can load and use it.

I am using HTML snippet in to Highlight HTML and Javascript code in blog Joomla. but it's executed after saving it

while creating a article I want to show some HTML code as part of content, but after saving that article that particular snippet of HTML code get executed.
I am using joomla 1.5 | code citation extension for insert code in article. Is there any solution?
You should turn off HTML stripping, or include it as a Custom HTML Module, and writing the position in the article with load position. to load the custom HTML you've put in the Module. i.e.
{loadposition YourModulePosition}
Will load anything you place within a Custom HTML Module.
The correct way should be to paste the code into the wysiwyg (design view, not raw code view) - as long as you have a decent editor the angle brackets should be converted to html entities and it should just work.
The built-in Geshi plugin - though a little dated - is usually all that is needed to make add colored highlighting. The plugin is a little dated but after inserting your code all you need to do to make it work is add:
<pre class="html"> ... </pre>
around your html. Chenge HTML to js, css, etc depending upon the code to be shown.

How can i get Plain text from Ajax Editor?

I need to get both plain text as well as html text from Ajax Editor. I'm able to get the html text and not able to retrieve plain text. i'm not supposed to eliminate html tags from the editor to retrieve plain text.
Is there any property, which gives plain text from ajax editor?
Sample code from my app:
i'm able to get rich html text like this:
string desc = QuestionAndAnswerEditor.Content;
Same way i want plain text.
Please help me.
Use HTML.Encode for getting encoded text. and html.decode ..

Resources