{"action":"opened","issue":{"url":"https://api.github.com/repos/tinymce/tinymce-docs/issues/232","labels_url":"https://api.github.com/repos/tinymce/tinymce-docs/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/tinymce/tinymce-docs/issues/232/comments","events_url":"https://api.github.com/repos/tinymce/tinymce-docs/issues/232/events","html_url":"https://github.com/tinymce/tinymce-docs/issues/232","id":119066669,"number":232,"title":"Problem with page plugins/noneditable.md","user":{"login":"adoerler","id":376589,"avatar_url":"https://avatars.githubusercontent.com/u/376589?v=3","gravatar_id":"","url":"https://api.github.com/users/adoerler","html_url":"https://github.com/adoerler","followers_url":"https://api.github.com/users/adoerler/followers","following_url":"https://api.github.com/users/adoerler/following{/other_user}","gists_url":"https://api.github.com/users/adoerler/gists{/gist_id}","starred_url":"https://api.github.com/users/adoerler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adoerler/subscriptions","organizations_url":"https://api.github.com/users/adoerler/orgs","repos_url":"https://api.github.com/users/adoerler/repos","events_url":"https://api.github.com/users/adoerler/events{/privacy}","received_events_url":"https://api.github.com/users/adoerler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-26T15:39:38Z","updated_at":"2015-11-26T15:39:38Z","closed_at":null,"body":"### [Noneditable Plugin](plugins/noneditable.md) issue:\r\nThe documentation states, that \"noneditable_regexp\" is of type string, but if you look into the code (https://github.com/tinymce/tinymce/blob/master/js/tinymce/plugins/noneditable/plugin.js) the plugin expects an array.\r\n\r\nIt counts the length and loops over this lenght to apply each given regex.\r\n\r\nIf one uses the documented string value, like:\r\n```javascript\r\ntinymce.init({\r\n  selector: \"textarea\",  // change this value according to your HTML\r\n  plugins: \"noneditable\",\r\n  noneditable_regexp: \"<a href=\\\"(.*?)\\\"></a>\"\r\n});\r\n```\r\nthe count is 20 and a regex for each character (i.e. \"<\", \"a\", \" \", \"h\", etc.) of the string is applied, which causes the editors content to break.\r\n\r\nTo make it work, you have to provide an array as configuration value: \r\n```javascript\r\n  noneditable_regexp: [\"<a href=\\\"(.*?)\\\"></a>\"]\r\n```\r\n\r\nIMHO the plugin should check if the parameter is a string and should use this as the one and only regex and if it's an array use it as is.\r\n\r\nThis happens in Version 4.3.0 and the currently reworked noneditable plugin.\r\n\r\nKind regards\r\nAndreas\r\n"}}