Author Topic: No paragraph around droplet?  (Read 8966 times)

instantflorian

  • Guest
No paragraph around droplet?
« on: August 29, 2014, 02:18:34 PM »
Hi,

when calling a droplet from a WYSIWYG section, there is a <p> or <div> around the droplet output code, because the wysiwyg editor adds <p>...</p> or at least <div>...</div> around the [[call]].

So if I have f.ex. a droplet which should build the output
Code: [Select]
<p class="specialclass">Some default text: some value</p> and I call this in a wysiwyg section by [[specialtext?value=some value]], the generated code in frontend is like
Code: [Select]
<p><p class="specialclass">Some default text: some value</p></p>what is neither valid nore what I wanted.

Is there any way to avoid this (except for calling droplets only out of code-sections, what is not practicable)?
I'm interested in a general solution, not for the stupid example above.

BR
-f.

Offline jacobi22

  • Posts: 5863
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: No paragraph around droplet?
« Reply #1 on: August 29, 2014, 02:56:07 PM »
i use a Code²-Section, if i need (a) droplet call(s) only in a section (not in combination with content like wysiwyg)

for the editors i use div in the settings
fckeditor/fckeditor/fckconfig.js
Code: [Select]
FCKConfig.EnterMode = 'div' ;
btw
ckeditor/wb_config/wb_ckconfig.js  or a wb_ckconfig.js in your template dir
Code: [Select]
config.enterMode = CKEDITOR.ENTER_DIV;
Wer nicht will, findet Gründe, wer will, findet Wege.

instantflorian

  • Guest
Re: No paragraph around droplet?
« Reply #2 on: September 02, 2014, 09:06:19 AM »
Thank you, but that's not exactly what I need... I do need <p> in wysiwyg section, so I can't set the default to <div>, and as I said before it's not practicable using droplets only in code2-sections. I could cope with that (although I wouldn't like it at all), but usual users would be overstrained I think.

Offline dbs

  • Betatester
  • **
  • Posts: 8010
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: No paragraph around droplet?
« Reply #3 on: September 02, 2014, 09:15:19 AM »
In the editor config.js you can choose what happens by Enter.
P, BR or DIV.

I use BR, so nothing will wrapped around anything.

 

postern-length