In my application, in insert news section, i use a sub string of news content for news Summary. for getting news content text from users,i use CKEditor and for news summary i use substring method to get a certain length of news content.but when i’m working with CKEditor i get text with html tags and not plain text and when i use substring method, my news summary become messed! how do i get raw text from this control?
i read this but i can’t use getText() method
In my application, in insert news section, i use a sub string of news
Share
do it like this
viola, grab the portion of plain_text you want.
UPDATE / EXAMPLE
add this javascript
in your HTML, add createTextSnippet as onsubmit-handler to the form, eg
inside the form, between
<form>and</form>insertWhen the form is submitted, you can serverside access hidden_snippet along with the rest of the fields in the form.