#12113 closed New Feature (fixed)
Add a path name for codesnippet plugin
Reported by: | Marek Lewandowski | Owned by: | Artur Delura |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.5 |
Component: | General | Version: | 4.4.0 |
Keywords: | Cc: |
Description
We should add a path name for codesnippet like "Code snippet" or simply "Snippet" (ofc it should be localized). This can be done by adding pathName
property to widget definition. Sample usage is available in placeholder plugin.
Change History (14)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Status: | confirmed → pending |
---|
comment:3 Changed 11 years ago by
I'd say simply:
- It makes more sense for casual users, who opens editor with preserved content.
- Lets remember that it's actually
pre code
rather thanpre
- It would make plugin more consistent with other CKSource provided widget plugins.
comment:4 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
I still think that "pre" is ok, the same way as "p" or "h1". Elements path isn't a tool for users totally unfamiliar with HTML at the moment. If we renamed "pre" to "code snippet" we would need to change also other names.
comment:5 Changed 10 years ago by
But pre is name of HTML tag so if real path is pre code
then I have to agree with @m.lewandowski this can be misleading.
I think that codesnippet
is much better here. We do similar for page break. We don't call it div but pagebreak in elements path.
@Reinmar please reconsider it one more time.
comment:6 Changed 10 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Hm... It makes sense what you wrote. Indeed we have here two elements and in fact the inner is more important than the outer. Let it be "codesnippet".
comment:7 Changed 10 years ago by
Milestone: | → CKEditor 4.4.5 |
---|---|
Status: | reopened → confirmed |
comment:8 Changed 10 years ago by
Owner: | set to Artur Delura |
---|---|
Status: | confirmed → assigned |
comment:9 Changed 10 years ago by
And if we got content as follow and codesnippet plugin enabled:
<pre>Hello</pre> <pre><code>function isEmpty() {}</code></pre>
Path for both are same: body pre
, but that are two diffrent things :)
comment:11 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
I don't like the fact that the name is translatable, but I see that in image2 it is as well, so it must be in this case too.
Fixed on master with git:558f516.
comment:12 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:13 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I changed the element's name to 'code snippet' in git:0f6bed50bdb.
comment:14 Changed 10 years ago by
For future reference: we cannot add two-word compounds like "codesnippet" without space as translatable content -- translators will not know what to do with it and we will end up with a mixture of unreadable stuff like "fragmentkodu" and untranslated entries.
Currently "pre" is displayed. What's wrong with this? It's short and I think that for most user (that will use code snippets) it's meaningful.