Opened 15 years ago
Closed 15 years ago
#5038 closed Bug (wontfix)
Impossible to add new format tag using configuration settings
Reported by: | Wiktor Walc | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
To add new format_tag according to the documentation it is enough to add something like:
config.format_pre = { element : 'pre', attributes : { class : 'code' } };
in the configuration object.
Unfortunately also a new language entry is needed by the format plugin in the onRender() function:
if ( tag != currentTag ) this.setValue( tag, editor.lang.format[ 'tag_' + tag ] );
Because there are no language entries for "unknown" tags, CKEditor is displaying them as "undefined" in Format combo box.
This can be solved by #1032 but should be also documented better when #1032 is fixed.
Change History (3)
comment:1 Changed 15 years ago by
Keywords: | Pending added; Confirmed removed |
---|
comment:2 Changed 15 years ago by
I've seen an attempt to add there code, dt and dd tags.
I can imagine also having there also a totally new tag styled as a block element that will be later parsed into something else on the server side.
comment:3 Changed 15 years ago by
Keywords: | Pending removed |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
In fact <code> is an inline element, so it would never work there. <dt> and <dd> are also special cases and we need dedicated plugins for them.
Anyway, we're not supposed to bring changes to the format combo. Actually, it can be totally deprecated by the Styles combo, which makes it possible to define any number and kind of block and inline styles. It should be used in that case.
The fact is that the format combo is not really made to accept any tag other than those set by default. This is by design.
Which other tags would you like to have there?