User tests: Successful: Unsuccessful:
Pull Request for Issue #20679
As @okonomiyaki3000 Suggested to remove the fullscreen message. I removed it.
Set default editor to codemirror in global configuration.
Open com_content and start creating an article. See, that there are no errors in web console.
Open the file administrator/components/com_content/forms/article.xml
and the text
<field
name="articletext2"
type="editor"
label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
filter="JComponentHelper::filterText"
buttons="true"
/>
after the field with the name articletext
4 . Open file
/administrator/components/com_content/tmpl/article/edit.php
and add the text
<?php echo $this->form->getInput('articletext2'); ?>
after the text
<?php echo $this->form->getInput('articletext'); ?>
No error in console.
Fix codemirror as a customelements .
Credit goes to @dgrammatiko joomla/joomla-cms#20679 (comment)
/media/vendor/codemirror/mode/text/html/text/html.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings JavaScript Repository Front End Plugins |
Title |
|
Labels |
Added:
?
?
|
And, also on eslint codestyle issue . Thanks
I have tested this item
I saw no error in console and the language string is changed like explained. I would only suggest to change the language string into something like this:
"In read only mode, a full screen is not possible"
Because the full screen does not open in read only mode.
If more than one editor is in write mode (no read only) on the page, the F10 key opens the editor where the cursor is currently located.
Can you also have a look on the remaining three hound issues?
@okonomiyaki3000 can you please test this pr as you are the code mirror expert? Thanks.
@brianteeman Can you please check language string? Thanks
I already have :)
A few problems still:
.min
.Uncaught SyntaxError: Unexpected token <
Ah, and it's a little out of date. The appearance options tab should show a preview of what the editor will look like with the current settings.
Oh and why not just remove that silly fullscreen message? I added it in the first place because I was changing the fullscreen hotkey from ctrl-q (seriously, who thought that was a good idea?) to something configurable but I figured that after a while we could remove it. People must have adjusted to the change by now, right?
@Anu1601CS can you have a look on the two first issues from @okonomiyaki3000. Thanks.
A few problems still:
The theme selector lists all themes twice. Once normally and once as .min.
After saving the plugin options, the editor is broken. Console says Uncaught SyntaxError: Unexpected token <
When editing a php file, there seems to be something wrong with syntax highlighting and the HTML part doesn't do things like tag completion. (now that I try it, this might be broken in the J3 version too...)
@okonomiyaki3000 Can you please share the testing instruction?
And, what you want to do in fullscreen message ?
The theme selector is in the plugin settings in the appearance tab. It's just a list of themes.
If you run the editor with ever having saved any options, it works. When you open the plugin settings and then save, all pages with codemirror on them will have errors.
To see the syntax highlighting issue, just open any php file with code mirror.
For the fullscreen message, I just think we don't need it at all. It doesn't make much sense. If we need to put instructions for using CodeMirror there, we should have a lot more than just that one item but why should we? We don't list instructions for other things.
@okonomiyaki3000 As you suggested #20746 to fix mode, it works fine and syntax highlight is also good. But, one problem is still present, if two codemirror editor is present in a same page, then we are only able to toggle last codemirror to fullscreen ( only one codemirror makes toggle) .
@okonomiyaki3000 Seems like i found solution of fullscreen.
And, should i remove fullscreen message for both ?
I'm not really the one to ask. I never liked the message at all. I'm sure someone must have asked me to put it there but it was so long ago... So, personally, I'd love to see it gone. If nobody else objects...
I have tested this item
I saw no error in console. I saw no full screen message. I like it, that there is no full screen message. I think it is confusing if there is more than one editor on a page. If people see the text "click F10 to open full-screen" more than one time, they will be wondering which editor will be opened.
If more than one editor is in write mode (no read only) on the page, the F10 key opens still the editor where the cursor is currently located. I think this is OK, because so people who know this feature from the past, can still use it.
I have tested this item
Thanks @dgrammatiko
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-06-22 14:39:43 |
Closed_By | ⇒ | laoneo | |
Labels |
Added:
?
|
Nice one, thanks all involved.
@dgrammatiko Please take a look in the code I have done some changes.