Opened 14 years ago

Closed 19 months ago

#276 closed enhancement (invalid)

Add border to <form> elements.

Reported by: PoeuffF Owned by: anonymous
Priority: low Milestone: 2.0
Component: Xinha Core Version:
Severity: normal Keywords: form border
Cc:

Description

I'm developping a form's plugin like fckeditor.

With this plugin you can create easily some <form> with <text> <select> <checkbox> ...

i d like to create a visibly area on the editor which allows people to see the limit of <form>

i don't know what function i have to use..

this.editor.insertHTML("<div style=\"border:1px dashed #ff0000;\" ><br><br></div>");

with this code, my area is created but <div ... /div> appear in the code generate by xinha.

So my question is :

What function i have to use to insert visibly HTML ( for my area ) which not appear in the code generate by xinha ?

Change History (17)

comment:1 Changed 14 years ago by niko

wouldn't do a simple css-rule like

form { border 1px dashed #ff0000; }

do the job too?

see InsertAnchor?-plugin for an example.

comment:2 Changed 14 years ago by gogo

Yes, this is a job for CSS, not inserting stuff into the html.

PS: I'm also working on a panel-based Macromediaish form plugin :)

comment:3 Changed 14 years ago by wymsy

See also ticket #256 for another forms plugin.

comment:4 Changed 14 years ago by anonymous

  • Owner changed from gogo to anonymous

comment:5 Changed 14 years ago by anonymous

cbdfdgfdg

comment:6 Changed 14 years ago by PoeuffF

Very good plugin on ticket #256

thx wymsy

it's that i need !!!

I've tryied with CSS to show the form's area but it doesn't work.

thx 4 your help

comment:7 Changed 14 years ago by PoeuffF

CSS works for all the page, but when i create a <form> it doesn't work.

Maybe because it's in a <textarea>...

i'm searching

comment:8 Changed 14 years ago by gogo

It appears to work for me. What CSS are you using, and how are you getting it into Xinha?

comment:9 Changed 14 years ago by PoeuffF

i put this line :

<style type="text/css">
form { border 1px dashed #ff0000; }
</style>

on my page.php which load plugin.. generate xinha.
but doesn't work, i think it's not the good place :/

comment:10 Changed 14 years ago by gogo

  • Keywords form border added
  • Severity changed from normal to enhancement
  • Summary changed from Form's plugin to Add border to <form> elements.

Yes, you need to give the style to Xinha, not to the page containing Xinha.

xinha_config.pageStyle = 'form { border 1px dashed #ff0000; }'

is what you want.

Setting enhancement, because I may include a style like that by default in the near future.

comment:11 Changed 14 years ago by PoeuffF

I don't understand why it doesn't work !!

if i try in my init() function:

myeditor = new HTMLArea("ta");
//..
myeditor.config.pageStyle = "form { border 1px dashed #ff0000; }";

or :

xinha_config = new HTMLArea.Config();
xinha_config.pageStyle = "form { border 1px dashed #ff0000; }";

Normally the area would appear but it's not appear :/

what's the best solution and where i have to put this line ?

comment:12 Changed 14 years ago by gogo

Note there is a colon missing in the CSS (should be "border:"). You should insert this into step 3 of the process as indicated in testbed.html or full_example-body.html (if using that file to base off, best to grab a fresh copy, I just made some minor changes).

Follow the NewbieGuide? and you should be right.

comment:13 Changed 14 years ago by PoeuffF

I've found why it doesn't work !!! LOL

as you can see with my english, i'm not english, i'm french ! lol

so my _editor_lang is "fr" and not "en".

With "en" it works but "fr" not.

So what function i've to add to work in french ?

comment:14 Changed 14 years ago by PoeuffF

It's not the lang "fr" which cause pb but the plugin FullPage?.

If you load the FullPage?'s plugin the area doesn't appear.

the solution is in the full-page.js :

function FullPage(editor) {
        this.editor = editor;

        var cfg = editor.config;
// COMMENT THIS LINE => cfg.fullPage = true;

Now it works normally in french ("fr") english ("en") and every lang.

Thx for your help.

comment:15 Changed 14 years ago by gocher

Look at plugin Forms changeset 191, only label and fieldset are missing!

comment:16 Changed 14 years ago by gogo

  • Milestone set to 2.0
  • Priority changed from normal to low

comment:17 Changed 19 months ago by gogo

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.