WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: instantflorian on August 29, 2014, 02:18:34 PM

Title: No paragraph around droplet?
Post by: instantflorian 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.
Title: Re: No paragraph around droplet?
Post by: Gast 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;
Title: Re: No paragraph around droplet?
Post by: instantflorian 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.
Title: Re: No paragraph around droplet?
Post by: dbs 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.