xoops forums

frankblack

Just can't stay away
Posted on: 2008/10/30 16:27
frankblack
frankblack (Show more)
Just can't stay away
Posts: 830
Since: 2005/6/13
#11

Re: HTML Editor

Quote:
Is there some solution for this problem?


Yes, I never figured out the reason for tinyeditor (which is similar), so I made a nasty hack.

I never used tinymce, but it should be the same: open class / xoopseditor / tinymce / form...whatever...php

There should be a function called render. In this function is the html-code for the textarea. Just add a blank right before the closing textarea-tag.

HTH

piar

Just popping in
Posted on: 2008/10/30 17:24
piar
piar (Show more)
Just popping in
Posts: 22
Since: 2008/10/30
#12

Re: HTML Editor

Blank - you mean normal space?

Because after I put there a space I have textareas like that:
<textarea name='hometext' id='hometext' rows='15' cols='60'> </textarea>

And now I don't get that message: 'Please enter The Scoop', but scoop text still isn't saved in DB :(

piar

Just popping in
Posted on: 2008/10/30 19:52
piar
piar (Show more)
Just popping in
Posts: 22
Since: 2008/10/30
#13

Re: HTML Editor

I've commented one line in file class/xoopseditor/tinymce/tinymce.php:

function setConfig$config )
    {
        
//$config["elements"] = implode(",", $this->getElements($config["elements"]));
        
foreach ($config as $key => $val) {
            
$this->config[$key] = $val;
        }
    }


and now both The Scoop as well as Extended Text are saved to DB :)

adium

Just popping in
Posted on: 2009/7/31 17:52
adium
adium (Show more)
Just popping in
Posts: 99
Since: 2005/1/18
#14

Re: HTML Editor

Quote:

There should be a function called render. In this function is the html-code for the textarea. Just add a blank right before the closing textarea-tag.


There is a function called render but there are no HTML tags in it.

function render()
    {
        
$ret $this->tinymce->render();
        
$ret .= parent::render();
        
        return 
$ret;
    }

Burning

Theme Designer
Posted on: 2010/10/14 18:23
Burning
Burning (Show more)
Theme Designer
Posts: 1163
Since: 2006/8/22
#15

Re: HTML Editor

hi'

JS Popup / Message "Please Enter The scoope" still appears (Xoops 2.4.5, News 1.66).

A true solution seems to be very difficult to find. For my particular use, I have replaced :
$editor news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext1560'hometext_hidden');
$sform->addElement($editortrue);

... by :
$editor news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext1560'hometext_hidden');
$sform->addElement($editorfalse);


The scoop is no more required, so no more JS popup...

---

Does someone know :
• a better solution ?
• if xNews module resolves this trouble with wysiwyg editors ?

Thanks
Still learning CSS and... english

ghia

Community Support Member
Posted on: 2010/10/14 18:48
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#16

Re: HTML Editor

Why don't you want the scoop filled in?
What is the sense of an empty News article?

Burning

Theme Designer
Posted on: 2010/10/14 18:59
Burning
Burning (Show more)
Theme Designer
Posts: 1163
Since: 2006/8/22
#17

Re: HTML Editor

hi' ghia,

I have to explain a little more (sorry for bad english)

There is a ""bug"" with News Submit form when you use a Rich text editor (in my case CKeditor).

I fill all the fields, included The Scoop. But when I click on Submit button, a js alert appears :
"Pleaser enter the scoop"

That makes non sense, because of course The scoop already contains text !

---

It is not a real bug :
• I remember that Hervet has explained the reason of this alert (if I well remember it is because there are two rich forms, heavy developments would be necessary)
• if you close alert popup (just to click on OK button) and you submit news form one more time, news is published. No more alert.

---

It is just annoying for people who are not warned. So I prefer to disable alerts by changing true to false... no more alert.
Still learning CSS and... english

ghia

Community Support Member
Posted on: 2010/10/14 19:08
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#18

Re: HTML Editor

Is it specific to CKEditor?
Never saw this with Koivi.
I don't remember having it with Tinymce either.

Burning

Theme Designer
Posted on: 2010/10/14 19:14
Burning
Burning (Show more)
Theme Designer
Posts: 1163
Since: 2006/8/22
#19

Re: HTML Editor

I do not use Koivi but this trouble appears with :
• FCKEditor
• CKEditor
• ... and I believe (see Franckblack post above), with Tiny

... it is an old matter, not related to a specific version of News
(I use News 1.66 but previous versions already displayed this alert).

Strange.. maybe someone could confirm about tinyeditor ?
Still learning CSS and... english

bjuti

Just can't stay away
Posted on: 2010/10/15 14:25
bjuti
bjuti (Show more)
Just can't stay away
Posts: 871
Since: 2009/1/7 2
#20

Re: HTML Editor

I had that problem on previous versions of Xoops or News, now it seems to be ok with tiny.